• Voucher_DBDataSet.Designer.vb
  • project /
1 '------------------------------------------------------------------------------
2 ' <auto-generated>
3 ' This code was generated
by a tool.
4 ' Runtime Version:
4.0.30319.42000
5 '
6 ' Changes to
this file may cause incorrect behavior and will be lost if
7 ' the code
is regenerated.
8 ' </auto-generated>
9 '------------------------------------------------------------------------------

10
11 Option Strict Off
12 Option Explicit On

13
14
15
16 '''<summary>
17 '''Represents a strongly typed
in-memory cache of data.
18 '''</summary>

19 <Global.System.Serializable(), _
20  Global.System.ComponentModel.DesignerCategoryAttribute(
"code"), _
21  Global.System.ComponentModel.ToolboxItem(
true), _
22  Global.System.Xml.Serialization.XmlSchemaProviderAttribute(
"GetTypedDataSetSchema"), _
23  Global.System.Xml.Serialization.XmlRootAttribute(
"Voucher_DBDataSet"), _
24  Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.DataSet")> _
25 Partial Public Class Voucher_DBDataSet
26     Inherits Global.System.Data.DataSet
27     
28     Private tableVoucher As VoucherDataTable
29     
30     Private tableVoucher_OtherDetails As Voucher_OtherDetailsDataTable
31     
32     Private tableCompany As CompanyDataTable
33     
34     Private relationFK_Voucher_OtherDetails_Voucher As Global.System.Data.DataRelation
35     
36     Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
37     
38     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
39      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
40     Public Sub New()
41         MyBase.New
42         Me.BeginInit
43         Me.InitClass
44         Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
45         AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
46         AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
47         Me.EndInit
48     End Sub
49     
50     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
51      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
52     Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
53         MyBase.New(info, context,
false)
54         If (Me.IsBinarySerialized(info, context) =
true) Then
55             Me.InitVars(
false)
56             Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
57             AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
58             AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
59             Return
60         End If
61         Dim strSchema As String = CType(info.GetValue(
"XmlSchema", GetType(String)),String)
62         If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
63             Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
64             ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
65             If (Not (ds.Tables(
"Voucher")) Is Nothing) Then
66                 MyBase.Tables.Add(New VoucherDataTable(ds.Tables(
"Voucher")))
67             End If
68             If (Not (ds.Tables(
"Voucher_OtherDetails")) Is Nothing) Then
69                 MyBase.Tables.Add(New Voucher_OtherDetailsDataTable(ds.Tables(
"Voucher_OtherDetails")))
70             End If
71             If (Not (ds.Tables(
"Company")) Is Nothing) Then
72                 MyBase.Tables.Add(New CompanyDataTable(ds.Tables(
"Company")))
73             End If
74             Me.DataSetName = ds.DataSetName
75             Me.Prefix = ds.Prefix
76             Me.Namespace = ds.Namespace
77             Me.Locale = ds.Locale
78             Me.CaseSensitive = ds.CaseSensitive
79             Me.EnforceConstraints = ds.EnforceConstraints
80             Me.Merge(ds,
false, Global.System.Data.MissingSchemaAction.Add)
81             Me.InitVars
82         Else
83             Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
84         End If
85         Me.GetSerializationData(info, context)
86         Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
87         AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
88         AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
89     End Sub
90     
91     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
92      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
93      Global.System.ComponentModel.Browsable(
false), _
94      Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
95     Public ReadOnly Property Voucher() As VoucherDataTable
96         Get
97             Return Me.tableVoucher
98         End Get
99     End Property
100     
101     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
102      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
103      Global.System.ComponentModel.Browsable(
false), _
104      Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
105     Public ReadOnly Property Voucher_OtherDetails() As Voucher_OtherDetailsDataTable
106         Get
107             Return Me.tableVoucher_OtherDetails
108         End Get
109     End Property
110     
111     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
112      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
113      Global.System.ComponentModel.Browsable(
false), _
114      Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
115     Public ReadOnly Property Company() As CompanyDataTable
116         Get
117             Return Me.tableCompany
118         End Get
119     End Property
120     
121     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
122      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
123      Global.System.ComponentModel.BrowsableAttribute(
true), _
124      Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
125     Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
126         Get
127             Return Me._schemaSerializationMode
128         End Get
129         Set
130             Me._schemaSerializationMode =
value
131         End Set
132     End Property
133     
134     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
135      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
136      Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
137     Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
138         Get
139             Return MyBase.Tables
140         End Get
141     End Property
142     
143     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
144      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
145      Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
146     Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
147         Get
148             Return MyBase.Relations
149         End Get
150     End Property
151     
152     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
153      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
154     Protected Overrides Sub InitializeDerivedDataSet()
155         Me.BeginInit
156         Me.InitClass
157         Me.EndInit
158     End Sub
159     
160     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
161      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
162     Public Overrides Function Clone() As Global.System.Data.DataSet
163         Dim cln As Voucher_DBDataSet = CType(MyBase.Clone,Voucher_DBDataSet)
164         cln.InitVars
165         cln.SchemaSerializationMode = Me.SchemaSerializationMode
166         Return cln
167     End Function
168     
169     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
170      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
171     Protected Overrides Function ShouldSerializeTables() As Boolean
172         Return
false
173     End Function
174     
175     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
176      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
177     Protected Overrides Function ShouldSerializeRelations() As Boolean
178         Return
false
179     End Function
180     
181     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
182      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
183     Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
184         If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
185             Me.Reset
186             Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
187             ds.ReadXml(reader)
188             If (Not (ds.Tables(
"Voucher")) Is Nothing) Then
189                 MyBase.Tables.Add(New VoucherDataTable(ds.Tables(
"Voucher")))
190             End If
191             If (Not (ds.Tables(
"Voucher_OtherDetails")) Is Nothing) Then
192                 MyBase.Tables.Add(New Voucher_OtherDetailsDataTable(ds.Tables(
"Voucher_OtherDetails")))
193             End If
194             If (Not (ds.Tables(
"Company")) Is Nothing) Then
195                 MyBase.Tables.Add(New CompanyDataTable(ds.Tables(
"Company")))
196             End If
197             Me.DataSetName = ds.DataSetName
198             Me.Prefix = ds.Prefix
199             Me.Namespace = ds.Namespace
200             Me.Locale = ds.Locale
201             Me.CaseSensitive = ds.CaseSensitive
202             Me.EnforceConstraints = ds.EnforceConstraints
203             Me.Merge(ds,
false, Global.System.Data.MissingSchemaAction.Add)
204             Me.InitVars
205         Else
206             Me.ReadXml(reader)
207             Me.InitVars
208         End If
209     End Sub
210     
211     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
212      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
213     Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
214         Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
215         Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
216         stream.Position =
0
217         Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
218     End Function
219     
220     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
221      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
222     Friend Overloads Sub InitVars()
223         Me.InitVars(
true)
224     End Sub
225     
226     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
227      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
228     Friend Overloads Sub InitVars(ByVal initTable As Boolean)
229         Me.tableVoucher = CType(MyBase.Tables(
"Voucher"),VoucherDataTable)
230         If (initTable =
true) Then
231             If (Not (Me.tableVoucher) Is Nothing) Then
232                 Me.tableVoucher.InitVars
233             End If
234         End If
235         Me.tableVoucher_OtherDetails = CType(MyBase.Tables(
"Voucher_OtherDetails"),Voucher_OtherDetailsDataTable)
236         If (initTable =
true) Then
237             If (Not (Me.tableVoucher_OtherDetails) Is Nothing) Then
238                 Me.tableVoucher_OtherDetails.InitVars
239             End If
240         End If
241         Me.tableCompany = CType(MyBase.Tables(
"Company"),CompanyDataTable)
242         If (initTable =
true) Then
243             If (Not (Me.tableCompany) Is Nothing) Then
244                 Me.tableCompany.InitVars
245             End If
246         End If
247         Me.relationFK_Voucher_OtherDetails_Voucher = Me.Relations(
"FK_Voucher_OtherDetails_Voucher")
248     End Sub
249     
250     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
251      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
252     Private Sub InitClass()
253         Me.DataSetName =
"Voucher_DBDataSet"
254         Me.Prefix =
""
255         Me.Namespace =
"http://tempuri.org/Voucher_DBDataSet.xsd"
256         Me.EnforceConstraints =
true
257         Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
258         Me.tableVoucher = New VoucherDataTable()
259         MyBase.Tables.Add(Me.tableVoucher)
260         Me.tableVoucher_OtherDetails = New Voucher_OtherDetailsDataTable()
261         MyBase.Tables.Add(Me.tableVoucher_OtherDetails)
262         Me.tableCompany = New CompanyDataTable()
263         MyBase.Tables.Add(Me.tableCompany)
264         Me.relationFK_Voucher_OtherDetails_Voucher = New Global.System.Data.DataRelation(
"FK_Voucher_OtherDetails_Voucher", New Global.System.Data.DataColumn() {Me.tableVoucher.IdColumn}, New Global.System.Data.DataColumn() {Me.tableVoucher_OtherDetails.VoucherIDColumn}, false)
265         Me.Relations.Add(Me.relationFK_Voucher_OtherDetails_Voucher)
266     End Sub
267     
268     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
269      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
270     Private Function ShouldSerializeVoucher() As Boolean
271         Return
false
272     End Function
273     
274     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
275      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
276     Private Function ShouldSerializeVoucher_OtherDetails() As Boolean
277         Return
false
278     End Function
279     
280     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
281      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
282     Private Function ShouldSerializeCompany() As Boolean
283         Return
false
284     End Function
285     
286     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
287      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
288     Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
289         If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
290             Me.InitVars
291         End If
292     End Sub
293     
294     <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
295      Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
296     Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
297         Dim ds As Voucher_DBDataSet = New Voucher_DBDataSet()
298         Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
299         Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
300         Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
301         any.Namespace = ds.Namespace
302         sequence.Items.Add(any)
303         type.Particle = sequence
304         Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
305         If xs.Contains(dsSchema.TargetNamespace) Then
306             Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
307             Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
308             Try
309                 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
310                 dsSchema.Write(s1)
311                 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
312                 Do While schemas.MoveNext
313                     schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
314                     s2.SetLength(
0)
315                     schema.Write(s2)
316                     If (s1.Length = s2.Length) Then
317                         s1.Position =
0
318                         s2.Position =
0
319                         
320                         Do While ((s1.Position <> s1.Length) _
321                                     AndAlso (s1.ReadByte = s2.ReadByte))
322                             
323                             
324                         Loop
325                         If (s1.Position = s1.Length) Then
326                             Return type
327                         End If
328                     End If
329                     
330                 Loop
331             Finally
332                 If (Not (s1) Is Nothing) Then
333                     s1.Close
334                 End If
335                 If (Not (s2) Is Nothing) Then
336                     s2.Close
337                 End If
338             End Try
339         End If
340         xs.Add(dsSchema)
341         Return type
342     End Function
343     
344     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
345     Public Delegate Sub VoucherRowChangeEventHandler(ByVal sender As Object, ByVal e As VoucherRowChangeEvent)
346     
347     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
348     Public Delegate Sub Voucher_OtherDetailsRowChangeEventHandler(ByVal sender As Object, ByVal e As Voucher_OtherDetailsRowChangeEvent)
349     
350     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
351     Public Delegate Sub CompanyRowChangeEventHandler(ByVal sender As Object, ByVal e As CompanyRowChangeEvent)
352     
353     
'''<summary>
354     
'''Represents the strongly named DataTable class.
355     
'''</summary>
356     <Global.System.Serializable(), _
357      Global.System.Xml.Serialization.XmlSchemaProviderAttribute(
"GetTypedTableSchema")> _
358     Partial Public Class VoucherDataTable
359         Inherits Global.System.Data.TypedTableBase(Of VoucherRow)
360         
361         Private columnId As Global.System.Data.DataColumn
362         
363         Private columnVoucherNo As Global.System.Data.DataColumn
364         
365         Private columnName As Global.System.Data.DataColumn
366         
367         Private columnDate As Global.System.Data.DataColumn
368         
369         Private columnDetails As Global.System.Data.DataColumn
370         
371         Private columnGrandTotal As Global.System.Data.DataColumn
372         
373         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
374          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
375         Public Sub New()
376             MyBase.New
377             Me.TableName =
"Voucher"
378             Me.BeginInit
379             Me.InitClass
380             Me.EndInit
381         End Sub
382         
383         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
384          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
385         Friend Sub New(ByVal table As Global.System.Data.DataTable)
386             MyBase.New
387             Me.TableName = table.TableName
388             If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
389                 Me.CaseSensitive = table.CaseSensitive
390             End If
391             If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
392                 Me.Locale = table.Locale
393             End If
394             If (table.Namespace <> table.DataSet.Namespace) Then
395                 Me.Namespace = table.Namespace
396             End If
397             Me.Prefix = table.Prefix
398             Me.MinimumCapacity = table.MinimumCapacity
399         End Sub
400         
401         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
402          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
403         Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
404             MyBase.New(info, context)
405             Me.InitVars
406         End Sub
407         
408         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
409          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
410         Public ReadOnly Property IdColumn() As Global.System.Data.DataColumn
411             Get
412                 Return Me.columnId
413             End Get
414         End Property
415         
416         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
417          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
418         Public ReadOnly Property VoucherNoColumn() As Global.System.Data.DataColumn
419             Get
420                 Return Me.columnVoucherNo
421             End Get
422         End Property
423         
424         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
425          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
426         Public ReadOnly Property NameColumn() As Global.System.Data.DataColumn
427             Get
428                 Return Me.columnName
429             End Get
430         End Property
431         
432         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
433          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
434         Public ReadOnly Property DateColumn() As Global.System.Data.DataColumn
435             Get
436                 Return Me.columnDate
437             End Get
438         End Property
439         
440         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
441          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
442         Public ReadOnly Property DetailsColumn() As Global.System.Data.DataColumn
443             Get
444                 Return Me.columnDetails
445             End Get
446         End Property
447         
448         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
449          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
450         Public ReadOnly Property GrandTotalColumn() As Global.System.Data.DataColumn
451             Get
452                 Return Me.columnGrandTotal
453             End Get
454         End Property
455         
456         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
457          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
458          Global.System.ComponentModel.Browsable(
false)> _
459         Public ReadOnly Property Count() As Integer
460             Get
461                 Return Me.Rows.Count
462             End Get
463         End Property
464         
465         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
466          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
467         Public Default ReadOnly Property Item(ByVal index As Integer) As VoucherRow
468             Get
469                 Return CType(Me.Rows(index),VoucherRow)
470             End Get
471         End Property
472         
473         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
474         Public Event VoucherRowChanging As VoucherRowChangeEventHandler
475         
476         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
477         Public Event VoucherRowChanged As VoucherRowChangeEventHandler
478         
479         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
480         Public Event VoucherRowDeleting As VoucherRowChangeEventHandler
481         
482         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
483         Public Event VoucherRowDeleted As VoucherRowChangeEventHandler
484         
485         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
486          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
487         Public Overloads Sub AddVoucherRow(ByVal row As VoucherRow)
488             Me.Rows.Add(row)
489         End Sub
490         
491         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
492          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
493         Public Overloads Function AddVoucherRow(ByVal Id As Integer, ByVal VoucherNo As String, ByVal Name As String, ByVal _Date As Date, ByVal Details As String, ByVal GrandTotal As Decimal) As VoucherRow
494             Dim rowVoucherRow As VoucherRow = CType(Me.NewRow,VoucherRow)
495             Dim columnValuesArray() As Object = New Object() {Id, VoucherNo, Name, _Date, Details, GrandTotal}
496             rowVoucherRow.ItemArray = columnValuesArray
497             Me.Rows.Add(rowVoucherRow)
498             Return rowVoucherRow
499         End Function
500         
501         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
502          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
503         Public Function FindById(ByVal Id As Integer) As VoucherRow
504             Return CType(Me.Rows.Find(New Object() {Id}),VoucherRow)
505         End Function
506         
507         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
508          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
509         Public Overrides Function Clone() As Global.System.Data.DataTable
510             Dim cln As VoucherDataTable = CType(MyBase.Clone,VoucherDataTable)
511             cln.InitVars
512             Return cln
513         End Function
514         
515         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
516          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
517         Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
518             Return New VoucherDataTable()
519         End Function
520         
521         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
522          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
523         Friend Sub InitVars()
524             Me.columnId = MyBase.Columns(
"Id")
525             Me.columnVoucherNo = MyBase.Columns(
"VoucherNo")
526             Me.columnName = MyBase.Columns(
"Name")
527             Me.columnDate = MyBase.Columns(
"Date")
528             Me.columnDetails = MyBase.Columns(
"Details")
529             Me.columnGrandTotal = MyBase.Columns(
"GrandTotal")
530         End Sub
531         
532         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
533          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
534         Private Sub InitClass()
535             Me.columnId = New Global.System.Data.DataColumn(
"Id", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
536             MyBase.Columns.Add(Me.columnId)
537             Me.columnVoucherNo = New Global.System.Data.DataColumn(
"VoucherNo", GetType(String), Nothing, Global.System.Data.MappingType.Element)
538             MyBase.Columns.Add(Me.columnVoucherNo)
539             Me.columnName = New Global.System.Data.DataColumn(
"Name", GetType(String), Nothing, Global.System.Data.MappingType.Element)
540             MyBase.Columns.Add(Me.columnName)
541             Me.columnDate = New Global.System.Data.DataColumn(
"Date", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
542             Me.columnDate.ExtendedProperties.Add(
"Generator_ColumnPropNameInTable", "DateColumn")
543             Me.columnDate.ExtendedProperties.Add(
"Generator_ColumnVarNameInTable", "columnDate")
544             Me.columnDate.ExtendedProperties.Add(
"Generator_UserColumnName", "Date")
545             MyBase.Columns.Add(Me.columnDate)
546             Me.columnDetails = New Global.System.Data.DataColumn(
"Details", GetType(String), Nothing, Global.System.Data.MappingType.Element)
547             MyBase.Columns.Add(Me.columnDetails)
548             Me.columnGrandTotal = New Global.System.Data.DataColumn(
"GrandTotal", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
549             MyBase.Columns.Add(Me.columnGrandTotal)
550             Me.Constraints.Add(New Global.System.Data.UniqueConstraint(
"Constraint1", New Global.System.Data.DataColumn() {Me.columnId}, true))
551             Me.columnId.AllowDBNull =
false
552             Me.columnId.Unique =
true
553             Me.columnVoucherNo.AllowDBNull =
false
554             Me.columnVoucherNo.MaxLength =
30
555             Me.columnName.MaxLength =
150
556             Me.columnDate.AllowDBNull =
false
557             Me.columnDetails.MaxLength =
10
558             Me.columnGrandTotal.AllowDBNull =
false
559         End Sub
560         
561         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
562          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
563         Public Function NewVoucherRow() As VoucherRow
564             Return CType(Me.NewRow,VoucherRow)
565         End Function
566         
567         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
568          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
569         Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
570             Return New VoucherRow(builder)
571         End Function
572         
573         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
574          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
575         Protected Overrides Function GetRowType() As Global.System.Type
576             Return GetType(VoucherRow)
577         End Function
578         
579         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
580          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
581         Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
582             MyBase.OnRowChanged(e)
583             If (Not (Me.VoucherRowChangedEvent) Is Nothing) Then
584                 RaiseEvent VoucherRowChanged(Me, New VoucherRowChangeEvent(CType(e.Row,VoucherRow), e.Action))
585             End If
586         End Sub
587         
588         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
589          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
590         Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
591             MyBase.OnRowChanging(e)
592             If (Not (Me.VoucherRowChangingEvent) Is Nothing) Then
593                 RaiseEvent VoucherRowChanging(Me, New VoucherRowChangeEvent(CType(e.Row,VoucherRow), e.Action))
594             End If
595         End Sub
596         
597         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
598          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
599         Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
600             MyBase.OnRowDeleted(e)
601             If (Not (Me.VoucherRowDeletedEvent) Is Nothing) Then
602                 RaiseEvent VoucherRowDeleted(Me, New VoucherRowChangeEvent(CType(e.Row,VoucherRow), e.Action))
603             End If
604         End Sub
605         
606         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
607          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
608         Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
609             MyBase.OnRowDeleting(e)
610             If (Not (Me.VoucherRowDeletingEvent) Is Nothing) Then
611                 RaiseEvent VoucherRowDeleting(Me, New VoucherRowChangeEvent(CType(e.Row,VoucherRow), e.Action))
612             End If
613         End Sub
614         
615         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
616          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
617         Public Sub RemoveVoucherRow(ByVal row As VoucherRow)
618             Me.Rows.Remove(row)
619         End Sub
620         
621         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
622          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
623         Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
624             Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
625             Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
626             Dim ds As Voucher_DBDataSet = New Voucher_DBDataSet()
627             Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
628             any1.Namespace =
"http://www.w3.org/2001/XMLSchema"
629             any1.MinOccurs = New Decimal(
0)
630             any1.MaxOccurs = Decimal.MaxValue
631             any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
632             sequence.Items.Add(any1)
633             Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
634             any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1"
635             any2.MinOccurs = New Decimal(
1)
636             any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
637             sequence.Items.Add(any2)
638             Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
639             attribute1.Name =
"namespace"
640             attribute1.FixedValue = ds.Namespace
641             type.Attributes.Add(attribute1)
642             Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
643             attribute2.Name =
"tableTypeName"
644             attribute2.FixedValue =
"VoucherDataTable"
645             type.Attributes.Add(attribute2)
646             type.Particle = sequence
647             Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
648             If xs.Contains(dsSchema.TargetNamespace) Then
649                 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
650                 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
651                 Try
652                     Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
653                     dsSchema.Write(s1)
654                     Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
655                     Do While schemas.MoveNext
656                         schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
657                         s2.SetLength(
0)
658                         schema.Write(s2)
659                         If (s1.Length = s2.Length) Then
660                             s1.Position =
0
661                             s2.Position =
0
662                             
663                             Do While ((s1.Position <> s1.Length) _
664                                         AndAlso (s1.ReadByte = s2.ReadByte))
665                                 
666                                 
667                             Loop
668                             If (s1.Position = s1.Length) Then
669                                 Return type
670                             End If
671                         End If
672                         
673                     Loop
674                 Finally
675                     If (Not (s1) Is Nothing) Then
676                         s1.Close
677                     End If
678                     If (Not (s2) Is Nothing) Then
679                         s2.Close
680                     End If
681                 End Try
682             End If
683             xs.Add(dsSchema)
684             Return type
685         End Function
686     End Class
687     
688     
'''<summary>
689     
'''Represents the strongly named DataTable class.
690     
'''</summary>
691     <Global.System.Serializable(), _
692      Global.System.Xml.Serialization.XmlSchemaProviderAttribute(
"GetTypedTableSchema")> _
693     Partial Public Class Voucher_OtherDetailsDataTable
694         Inherits Global.System.Data.TypedTableBase(Of Voucher_OtherDetailsRow)
695         
696         Private columnVD_ID As Global.System.Data.DataColumn
697         
698         Private columnVoucherID As Global.System.Data.DataColumn
699         
700         Private columnParticulars As Global.System.Data.DataColumn
701         
702         Private columnAmount As Global.System.Data.DataColumn
703         
704         Private columnNote As Global.System.Data.DataColumn
705         
706         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
707          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
708         Public Sub New()
709             MyBase.New
710             Me.TableName =
"Voucher_OtherDetails"
711             Me.BeginInit
712             Me.InitClass
713             Me.EndInit
714         End Sub
715         
716         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
717          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
718         Friend Sub New(ByVal table As Global.System.Data.DataTable)
719             MyBase.New
720             Me.TableName = table.TableName
721             If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
722                 Me.CaseSensitive = table.CaseSensitive
723             End If
724             If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
725                 Me.Locale = table.Locale
726             End If
727             If (table.Namespace <> table.DataSet.Namespace) Then
728                 Me.Namespace = table.Namespace
729             End If
730             Me.Prefix = table.Prefix
731             Me.MinimumCapacity = table.MinimumCapacity
732         End Sub
733         
734         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
735          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
736         Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
737             MyBase.New(info, context)
738             Me.InitVars
739         End Sub
740         
741         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
742          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
743         Public ReadOnly Property VD_IDColumn() As Global.System.Data.DataColumn
744             Get
745                 Return Me.columnVD_ID
746             End Get
747         End Property
748         
749         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
750          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
751         Public ReadOnly Property VoucherIDColumn() As Global.System.Data.DataColumn
752             Get
753                 Return Me.columnVoucherID
754             End Get
755         End Property
756         
757         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
758          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
759         Public ReadOnly Property ParticularsColumn() As Global.System.Data.DataColumn
760             Get
761                 Return Me.columnParticulars
762             End Get
763         End Property
764         
765         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
766          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
767         Public ReadOnly Property AmountColumn() As Global.System.Data.DataColumn
768             Get
769                 Return Me.columnAmount
770             End Get
771         End Property
772         
773         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
774          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
775         Public ReadOnly Property NoteColumn() As Global.System.Data.DataColumn
776             Get
777                 Return Me.columnNote
778             End Get
779         End Property
780         
781         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
782          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
783          Global.System.ComponentModel.Browsable(
false)> _
784         Public ReadOnly Property Count() As Integer
785             Get
786                 Return Me.Rows.Count
787             End Get
788         End Property
789         
790         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
791          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
792         Public Default ReadOnly Property Item(ByVal index As Integer) As Voucher_OtherDetailsRow
793             Get
794                 Return CType(Me.Rows(index),Voucher_OtherDetailsRow)
795             End Get
796         End Property
797         
798         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
799         Public Event Voucher_OtherDetailsRowChanging As Voucher_OtherDetailsRowChangeEventHandler
800         
801         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
802         Public Event Voucher_OtherDetailsRowChanged As Voucher_OtherDetailsRowChangeEventHandler
803         
804         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
805         Public Event Voucher_OtherDetailsRowDeleting As Voucher_OtherDetailsRowChangeEventHandler
806         
807         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
808         Public Event Voucher_OtherDetailsRowDeleted As Voucher_OtherDetailsRowChangeEventHandler
809         
810         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
811          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
812         Public Overloads Sub AddVoucher_OtherDetailsRow(ByVal row As Voucher_OtherDetailsRow)
813             Me.Rows.Add(row)
814         End Sub
815         
816         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
817          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
818         Public Overloads Function AddVoucher_OtherDetailsRow(ByVal parentVoucherRowByFK_Voucher_OtherDetails_Voucher As VoucherRow, ByVal Particulars As String, ByVal Amount As Decimal, ByVal Note As String) As Voucher_OtherDetailsRow
819             Dim rowVoucher_OtherDetailsRow As Voucher_OtherDetailsRow = CType(Me.NewRow,Voucher_OtherDetailsRow)
820             Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, Particulars, Amount, Note}
821             If (Not (parentVoucherRowByFK_Voucher_OtherDetails_Voucher) Is Nothing) Then
822                 columnValuesArray(
1) = parentVoucherRowByFK_Voucher_OtherDetails_Voucher(0)
823             End If
824             rowVoucher_OtherDetailsRow.ItemArray = columnValuesArray
825             Me.Rows.Add(rowVoucher_OtherDetailsRow)
826             Return rowVoucher_OtherDetailsRow
827         End Function
828         
829         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
830          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
831         Public Function FindByVD_ID(ByVal VD_ID As Integer) As Voucher_OtherDetailsRow
832             Return CType(Me.Rows.Find(New Object() {VD_ID}),Voucher_OtherDetailsRow)
833         End Function
834         
835         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
836          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
837         Public Overrides Function Clone() As Global.System.Data.DataTable
838             Dim cln As Voucher_OtherDetailsDataTable = CType(MyBase.Clone,Voucher_OtherDetailsDataTable)
839             cln.InitVars
840             Return cln
841         End Function
842         
843         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
844          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
845         Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
846             Return New Voucher_OtherDetailsDataTable()
847         End Function
848         
849         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
850          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
851         Friend Sub InitVars()
852             Me.columnVD_ID = MyBase.Columns(
"VD_ID")
853             Me.columnVoucherID = MyBase.Columns(
"VoucherID")
854             Me.columnParticulars = MyBase.Columns(
"Particulars")
855             Me.columnAmount = MyBase.Columns(
"Amount")
856             Me.columnNote = MyBase.Columns(
"Note")
857         End Sub
858         
859         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
860          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
861         Private Sub InitClass()
862             Me.columnVD_ID = New Global.System.Data.DataColumn(
"VD_ID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
863             MyBase.Columns.Add(Me.columnVD_ID)
864             Me.columnVoucherID = New Global.System.Data.DataColumn(
"VoucherID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
865             MyBase.Columns.Add(Me.columnVoucherID)
866             Me.columnParticulars = New Global.System.Data.DataColumn(
"Particulars", GetType(String), Nothing, Global.System.Data.MappingType.Element)
867             MyBase.Columns.Add(Me.columnParticulars)
868             Me.columnAmount = New Global.System.Data.DataColumn(
"Amount", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
869             MyBase.Columns.Add(Me.columnAmount)
870             Me.columnNote = New Global.System.Data.DataColumn(
"Note", GetType(String), Nothing, Global.System.Data.MappingType.Element)
871             MyBase.Columns.Add(Me.columnNote)
872             Me.Constraints.Add(New Global.System.Data.UniqueConstraint(
"Constraint1", New Global.System.Data.DataColumn() {Me.columnVD_ID}, true))
873             Me.columnVD_ID.AutoIncrement =
true
874             Me.columnVD_ID.AutoIncrementSeed = -
1
875             Me.columnVD_ID.AutoIncrementStep = -
1
876             Me.columnVD_ID.AllowDBNull =
false
877             Me.columnVD_ID.ReadOnly =
true
878             Me.columnVD_ID.Unique =
true
879             Me.columnVoucherID.AllowDBNull =
false
880             Me.columnParticulars.AllowDBNull =
false
881             Me.columnParticulars.MaxLength =
200
882             Me.columnAmount.AllowDBNull =
false
883             Me.columnNote.MaxLength =
2147483647
884         End Sub
885         
886         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
887          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
888         Public Function NewVoucher_OtherDetailsRow() As Voucher_OtherDetailsRow
889             Return CType(Me.NewRow,Voucher_OtherDetailsRow)
890         End Function
891         
892         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
893          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
894         Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
895             Return New Voucher_OtherDetailsRow(builder)
896         End Function
897         
898         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
899          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
900         Protected Overrides Function GetRowType() As Global.System.Type
901             Return GetType(Voucher_OtherDetailsRow)
902         End Function
903         
904         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
905          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
906         Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
907             MyBase.OnRowChanged(e)
908             If (Not (Me.Voucher_OtherDetailsRowChangedEvent) Is Nothing) Then
909                 RaiseEvent Voucher_OtherDetailsRowChanged(Me, New Voucher_OtherDetailsRowChangeEvent(CType(e.Row,Voucher_OtherDetailsRow), e.Action))
910             End If
911         End Sub
912         
913         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
914          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
915         Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
916             MyBase.OnRowChanging(e)
917             If (Not (Me.Voucher_OtherDetailsRowChangingEvent) Is Nothing) Then
918                 RaiseEvent Voucher_OtherDetailsRowChanging(Me, New Voucher_OtherDetailsRowChangeEvent(CType(e.Row,Voucher_OtherDetailsRow), e.Action))
919             End If
920         End Sub
921         
922         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
923          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
924         Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
925             MyBase.OnRowDeleted(e)
926             If (Not (Me.Voucher_OtherDetailsRowDeletedEvent) Is Nothing) Then
927                 RaiseEvent Voucher_OtherDetailsRowDeleted(Me, New Voucher_OtherDetailsRowChangeEvent(CType(e.Row,Voucher_OtherDetailsRow), e.Action))
928             End If
929         End Sub
930         
931         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
932          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
933         Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
934             MyBase.OnRowDeleting(e)
935             If (Not (Me.Voucher_OtherDetailsRowDeletingEvent) Is Nothing) Then
936                 RaiseEvent Voucher_OtherDetailsRowDeleting(Me, New Voucher_OtherDetailsRowChangeEvent(CType(e.Row,Voucher_OtherDetailsRow), e.Action))
937             End If
938         End Sub
939         
940         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
941          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
942         Public Sub RemoveVoucher_OtherDetailsRow(ByVal row As Voucher_OtherDetailsRow)
943             Me.Rows.Remove(row)
944         End Sub
945         
946         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
947          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
948         Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
949             Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
950             Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
951             Dim ds As Voucher_DBDataSet = New Voucher_DBDataSet()
952             Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
953             any1.Namespace =
"http://www.w3.org/2001/XMLSchema"
954             any1.MinOccurs = New Decimal(
0)
955             any1.MaxOccurs = Decimal.MaxValue
956             any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
957             sequence.Items.Add(any1)
958             Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
959             any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1"
960             any2.MinOccurs = New Decimal(
1)
961             any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
962             sequence.Items.Add(any2)
963             Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
964             attribute1.Name =
"namespace"
965             attribute1.FixedValue = ds.Namespace
966             type.Attributes.Add(attribute1)
967             Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
968             attribute2.Name =
"tableTypeName"
969             attribute2.FixedValue =
"Voucher_OtherDetailsDataTable"
970             type.Attributes.Add(attribute2)
971             type.Particle = sequence
972             Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
973             If xs.Contains(dsSchema.TargetNamespace) Then
974                 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
975                 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
976                 Try
977                     Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
978                     dsSchema.Write(s1)
979                     Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
980                     Do While schemas.MoveNext
981                         schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
982                         s2.SetLength(
0)
983                         schema.Write(s2)
984                         If (s1.Length = s2.Length) Then
985                             s1.Position =
0
986                             s2.Position =
0
987                             
988                             Do While ((s1.Position <> s1.Length) _
989                                         AndAlso (s1.ReadByte = s2.ReadByte))
990                                 
991                                 
992                             Loop
993                             If (s1.Position = s1.Length) Then
994                                 Return type
995                             End If
996                         End If
997                         
998                     Loop
999                 Finally
1000                     If (Not (s1) Is Nothing) Then
1001                         s1.Close
1002                     End If
1003                     If (Not (s2) Is Nothing) Then
1004                         s2.Close
1005                     End If
1006                 End Try
1007             End If
1008             xs.Add(dsSchema)
1009             Return type
1010         End Function
1011     End Class
1012     
1013     
'''<summary>
1014     
'''Represents the strongly named DataTable class.
1015     
'''</summary>
1016     <Global.System.Serializable(), _
1017      Global.System.Xml.Serialization.XmlSchemaProviderAttribute(
"GetTypedTableSchema")> _
1018     Partial Public Class CompanyDataTable
1019         Inherits Global.System.Data.TypedTableBase(Of CompanyRow)
1020         
1021         Private columnID As Global.System.Data.DataColumn
1022         
1023         Private columnCompanyName As Global.System.Data.DataColumn
1024         
1025         Private columnAddress As Global.System.Data.DataColumn
1026         
1027         Private columnContactNo As Global.System.Data.DataColumn
1028         
1029         Private columnEmailID As Global.System.Data.DataColumn
1030         
1031         Private columnLogo As Global.System.Data.DataColumn
1032         
1033         Private columnTIN As Global.System.Data.DataColumn
1034         
1035         Private columnSTNo As Global.System.Data.DataColumn
1036         
1037         Private columnCIN As Global.System.Data.DataColumn
1038         
1039         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1040          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1041         Public Sub New()
1042             MyBase.New
1043             Me.TableName =
"Company"
1044             Me.BeginInit
1045             Me.InitClass
1046             Me.EndInit
1047         End Sub
1048         
1049         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1050          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1051         Friend Sub New(ByVal table As Global.System.Data.DataTable)
1052             MyBase.New
1053             Me.TableName = table.TableName
1054             If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
1055                 Me.CaseSensitive = table.CaseSensitive
1056             End If
1057             If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
1058                 Me.Locale = table.Locale
1059             End If
1060             If (table.Namespace <> table.DataSet.Namespace) Then
1061                 Me.Namespace = table.Namespace
1062             End If
1063             Me.Prefix = table.Prefix
1064             Me.MinimumCapacity = table.MinimumCapacity
1065         End Sub
1066         
1067         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1068          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1069         Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
1070             MyBase.New(info, context)
1071             Me.InitVars
1072         End Sub
1073         
1074         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1075          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1076         Public ReadOnly Property IDColumn() As Global.System.Data.DataColumn
1077             Get
1078                 Return Me.columnID
1079             End Get
1080         End Property
1081         
1082         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1083          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1084         Public ReadOnly Property CompanyNameColumn() As Global.System.Data.DataColumn
1085             Get
1086                 Return Me.columnCompanyName
1087             End Get
1088         End Property
1089         
1090         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1091          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1092         Public ReadOnly Property AddressColumn() As Global.System.Data.DataColumn
1093             Get
1094                 Return Me.columnAddress
1095             End Get
1096         End Property
1097         
1098         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1099          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1100         Public ReadOnly Property ContactNoColumn() As Global.System.Data.DataColumn
1101             Get
1102                 Return Me.columnContactNo
1103             End Get
1104         End Property
1105         
1106         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1107          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1108         Public ReadOnly Property EmailIDColumn() As Global.System.Data.DataColumn
1109             Get
1110                 Return Me.columnEmailID
1111             End Get
1112         End Property
1113         
1114         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1115          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1116         Public ReadOnly Property LogoColumn() As Global.System.Data.DataColumn
1117             Get
1118                 Return Me.columnLogo
1119             End Get
1120         End Property
1121         
1122         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1123          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1124         Public ReadOnly Property TINColumn() As Global.System.Data.DataColumn
1125             Get
1126                 Return Me.columnTIN
1127             End Get
1128         End Property
1129         
1130         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1131          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1132         Public ReadOnly Property STNoColumn() As Global.System.Data.DataColumn
1133             Get
1134                 Return Me.columnSTNo
1135             End Get
1136         End Property
1137         
1138         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1139          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1140         Public ReadOnly Property CINColumn() As Global.System.Data.DataColumn
1141             Get
1142                 Return Me.columnCIN
1143             End Get
1144         End Property
1145         
1146         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1147          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1148          Global.System.ComponentModel.Browsable(
false)> _
1149         Public ReadOnly Property Count() As Integer
1150             Get
1151                 Return Me.Rows.Count
1152             End Get
1153         End Property
1154         
1155         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1156          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1157         Public Default ReadOnly Property Item(ByVal index As Integer) As CompanyRow
1158             Get
1159                 Return CType(Me.Rows(index),CompanyRow)
1160             End Get
1161         End Property
1162         
1163         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1164         Public Event CompanyRowChanging As CompanyRowChangeEventHandler
1165         
1166         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1167         Public Event CompanyRowChanged As CompanyRowChangeEventHandler
1168         
1169         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1170         Public Event CompanyRowDeleting As CompanyRowChangeEventHandler
1171         
1172         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1173         Public Event CompanyRowDeleted As CompanyRowChangeEventHandler
1174         
1175         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1176          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1177         Public Overloads Sub AddCompanyRow(ByVal row As CompanyRow)
1178             Me.Rows.Add(row)
1179         End Sub
1180         
1181         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1182          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1183         Public Overloads Function AddCompanyRow(ByVal CompanyName As String, ByVal Address As String, ByVal ContactNo As String, ByVal EmailID As String, ByVal Logo() As Byte, ByVal TIN As String, ByVal STNo As String, ByVal CIN As String) As CompanyRow
1184             Dim rowCompanyRow As CompanyRow = CType(Me.NewRow,CompanyRow)
1185             Dim columnValuesArray() As Object = New Object() {Nothing, CompanyName, Address, ContactNo, EmailID, Logo, TIN, STNo, CIN}
1186             rowCompanyRow.ItemArray = columnValuesArray
1187             Me.Rows.Add(rowCompanyRow)
1188             Return rowCompanyRow
1189         End Function
1190         
1191         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1192          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1193         Public Function FindByID(ByVal ID As Integer) As CompanyRow
1194             Return CType(Me.Rows.Find(New Object() {ID}),CompanyRow)
1195         End Function
1196         
1197         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1198          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1199         Public Overrides Function Clone() As Global.System.Data.DataTable
1200             Dim cln As CompanyDataTable = CType(MyBase.Clone,CompanyDataTable)
1201             cln.InitVars
1202             Return cln
1203         End Function
1204         
1205         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1206          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1207         Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
1208             Return New CompanyDataTable()
1209         End Function
1210         
1211         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1212          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1213         Friend Sub InitVars()
1214             Me.columnID = MyBase.Columns(
"ID")
1215             Me.columnCompanyName = MyBase.Columns(
"CompanyName")
1216             Me.columnAddress = MyBase.Columns(
"Address")
1217             Me.columnContactNo = MyBase.Columns(
"ContactNo")
1218             Me.columnEmailID = MyBase.Columns(
"EmailID")
1219             Me.columnLogo = MyBase.Columns(
"Logo")
1220             Me.columnTIN = MyBase.Columns(
"TIN")
1221             Me.columnSTNo = MyBase.Columns(
"STNo")
1222             Me.columnCIN = MyBase.Columns(
"CIN")
1223         End Sub
1224         
1225         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1226          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1227         Private Sub InitClass()
1228             Me.columnID = New Global.System.Data.DataColumn(
"ID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
1229             MyBase.Columns.Add(Me.columnID)
1230             Me.columnCompanyName = New Global.System.Data.DataColumn(
"CompanyName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1231             MyBase.Columns.Add(Me.columnCompanyName)
1232             Me.columnAddress = New Global.System.Data.DataColumn(
"Address", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1233             MyBase.Columns.Add(Me.columnAddress)
1234             Me.columnContactNo = New Global.System.Data.DataColumn(
"ContactNo", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1235             MyBase.Columns.Add(Me.columnContactNo)
1236             Me.columnEmailID = New Global.System.Data.DataColumn(
"EmailID", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1237             MyBase.Columns.Add(Me.columnEmailID)
1238             Me.columnLogo = New Global.System.Data.DataColumn(
"Logo", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
1239             MyBase.Columns.Add(Me.columnLogo)
1240             Me.columnTIN = New Global.System.Data.DataColumn(
"TIN", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1241             MyBase.Columns.Add(Me.columnTIN)
1242             Me.columnSTNo = New Global.System.Data.DataColumn(
"STNo", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1243             MyBase.Columns.Add(Me.columnSTNo)
1244             Me.columnCIN = New Global.System.Data.DataColumn(
"CIN", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1245             MyBase.Columns.Add(Me.columnCIN)
1246             Me.Constraints.Add(New Global.System.Data.UniqueConstraint(
"Constraint1", New Global.System.Data.DataColumn() {Me.columnID}, true))
1247             Me.columnID.AutoIncrement =
true
1248             Me.columnID.AutoIncrementSeed = -
1
1249             Me.columnID.AutoIncrementStep = -
1
1250             Me.columnID.AllowDBNull =
false
1251             Me.columnID.ReadOnly =
true
1252             Me.columnID.Unique =
true
1253             Me.columnCompanyName.AllowDBNull =
false
1254             Me.columnCompanyName.MaxLength =
200
1255             Me.columnAddress.AllowDBNull =
false
1256             Me.columnAddress.MaxLength =
250
1257             Me.columnContactNo.AllowDBNull =
false
1258             Me.columnContactNo.MaxLength =
150
1259             Me.columnEmailID.AllowDBNull =
false
1260             Me.columnEmailID.MaxLength =
150
1261             Me.columnLogo.AllowDBNull =
false
1262             Me.columnTIN.MaxLength =
150
1263             Me.columnSTNo.MaxLength =
150
1264             Me.columnCIN.MaxLength =
150
1265         End Sub
1266         
1267         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1268          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1269         Public Function NewCompanyRow() As CompanyRow
1270             Return CType(Me.NewRow,CompanyRow)
1271         End Function
1272         
1273         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1274          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1275         Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
1276             Return New CompanyRow(builder)
1277         End Function
1278         
1279         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1280          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1281         Protected Overrides Function GetRowType() As Global.System.Type
1282             Return GetType(CompanyRow)
1283         End Function
1284         
1285         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1286          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1287         Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1288             MyBase.OnRowChanged(e)
1289             If (Not (Me.CompanyRowChangedEvent) Is Nothing) Then
1290                 RaiseEvent CompanyRowChanged(Me, New CompanyRowChangeEvent(CType(e.Row,CompanyRow), e.Action))
1291             End If
1292         End Sub
1293         
1294         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1295          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1296         Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1297             MyBase.OnRowChanging(e)
1298             If (Not (Me.CompanyRowChangingEvent) Is Nothing) Then
1299                 RaiseEvent CompanyRowChanging(Me, New CompanyRowChangeEvent(CType(e.Row,CompanyRow), e.Action))
1300             End If
1301         End Sub
1302         
1303         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1304          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1305         Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1306             MyBase.OnRowDeleted(e)
1307             If (Not (Me.CompanyRowDeletedEvent) Is Nothing) Then
1308                 RaiseEvent CompanyRowDeleted(Me, New CompanyRowChangeEvent(CType(e.Row,CompanyRow), e.Action))
1309             End If
1310         End Sub
1311         
1312         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1313          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1314         Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1315             MyBase.OnRowDeleting(e)
1316             If (Not (Me.CompanyRowDeletingEvent) Is Nothing) Then
1317                 RaiseEvent CompanyRowDeleting(Me, New CompanyRowChangeEvent(CType(e.Row,CompanyRow), e.Action))
1318             End If
1319         End Sub
1320         
1321         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1322          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1323         Public Sub RemoveCompanyRow(ByVal row As CompanyRow)
1324             Me.Rows.Remove(row)
1325         End Sub
1326         
1327         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1328          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1329         Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
1330             Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
1331             Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
1332             Dim ds As Voucher_DBDataSet = New Voucher_DBDataSet()
1333             Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
1334             any1.Namespace =
"http://www.w3.org/2001/XMLSchema"
1335             any1.MinOccurs = New Decimal(
0)
1336             any1.MaxOccurs = Decimal.MaxValue
1337             any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1338             sequence.Items.Add(any1)
1339             Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
1340             any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1"
1341             any2.MinOccurs = New Decimal(
1)
1342             any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1343             sequence.Items.Add(any2)
1344             Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
1345             attribute1.Name =
"namespace"
1346             attribute1.FixedValue = ds.Namespace
1347             type.Attributes.Add(attribute1)
1348             Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
1349             attribute2.Name =
"tableTypeName"
1350             attribute2.FixedValue =
"CompanyDataTable"
1351             type.Attributes.Add(attribute2)
1352             type.Particle = sequence
1353             Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
1354             If xs.Contains(dsSchema.TargetNamespace) Then
1355                 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
1356                 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
1357                 Try
1358                     Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
1359                     dsSchema.Write(s1)
1360                     Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
1361                     Do While schemas.MoveNext
1362                         schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
1363                         s2.SetLength(
0)
1364                         schema.Write(s2)
1365                         If (s1.Length = s2.Length) Then
1366                             s1.Position =
0
1367                             s2.Position =
0
1368                             
1369                             Do While ((s1.Position <> s1.Length) _
1370                                         AndAlso (s1.ReadByte = s2.ReadByte))
1371                                 
1372                                 
1373                             Loop
1374                             If (s1.Position = s1.Length) Then
1375                                 Return type
1376                             End If
1377                         End If
1378                         
1379                     Loop
1380                 Finally
1381                     If (Not (s1) Is Nothing) Then
1382                         s1.Close
1383                     End If
1384                     If (Not (s2) Is Nothing) Then
1385                         s2.Close
1386                     End If
1387                 End Try
1388             End If
1389             xs.Add(dsSchema)
1390             Return type
1391         End Function
1392     End Class
1393     
1394     
'''<summary>
1395     
'''Represents strongly named DataRow class.
1396     
'''</summary>
1397     Partial Public Class VoucherRow
1398         Inherits Global.System.Data.DataRow
1399         
1400         Private tableVoucher As VoucherDataTable
1401         
1402         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1403          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1404         Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
1405             MyBase.New(rb)
1406             Me.tableVoucher = CType(Me.Table,VoucherDataTable)
1407         End Sub
1408         
1409         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1410          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1411         Public Property Id() As Integer
1412             Get
1413                 Return CType(Me(Me.tableVoucher.IdColumn),Integer)
1414             End Get
1415             Set
1416                 Me(Me.tableVoucher.IdColumn) =
value
1417             End Set
1418         End Property
1419         
1420         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1421          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1422         Public Property VoucherNo() As String
1423             Get
1424                 Return CType(Me(Me.tableVoucher.VoucherNoColumn),String)
1425             End Get
1426             Set
1427                 Me(Me.tableVoucher.VoucherNoColumn) =
value
1428             End Set
1429         End Property
1430         
1431         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1432          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1433         Public Property Name() As String
1434             Get
1435                 Try
1436                     Return CType(Me(Me.tableVoucher.NameColumn),String)
1437                 Catch e As Global.System.InvalidCastException
1438                     Throw New Global.System.Data.StrongTypingException(
"The value for column 'Name' in table 'Voucher' is DBNull.", e)
1439                 End Try
1440             End Get
1441             Set
1442                 Me(Me.tableVoucher.NameColumn) =
value
1443             End Set
1444         End Property
1445         
1446         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1447          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1448         Public Property _Date() As Date
1449             Get
1450                 Return CType(Me(Me.tableVoucher.DateColumn),Date)
1451             End Get
1452             Set
1453                 Me(Me.tableVoucher.DateColumn) =
value
1454             End Set
1455         End Property
1456         
1457         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1458          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1459         Public Property Details() As String
1460             Get
1461                 Try
1462                     Return CType(Me(Me.tableVoucher.DetailsColumn),String)
1463                 Catch e As Global.System.InvalidCastException
1464                     Throw New Global.System.Data.StrongTypingException(
"The value for column 'Details' in table 'Voucher' is DBNull.", e)
1465                 End Try
1466             End Get
1467             Set
1468                 Me(Me.tableVoucher.DetailsColumn) =
value
1469             End Set
1470         End Property
1471         
1472         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1473          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1474         Public Property GrandTotal() As Decimal
1475             Get
1476                 Return CType(Me(Me.tableVoucher.GrandTotalColumn),Decimal)
1477             End Get
1478             Set
1479                 Me(Me.tableVoucher.GrandTotalColumn) =
value
1480             End Set
1481         End Property
1482         
1483         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1484          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1485         Public Function IsNameNull() As Boolean
1486             Return Me.IsNull(Me.tableVoucher.NameColumn)
1487         End Function
1488         
1489         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1490          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1491         Public Sub SetNameNull()
1492             Me(Me.tableVoucher.NameColumn) = Global.System.Convert.DBNull
1493         End Sub
1494         
1495         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1496          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1497         Public Function IsDetailsNull() As Boolean
1498             Return Me.IsNull(Me.tableVoucher.DetailsColumn)
1499         End Function
1500         
1501         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1502          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1503         Public Sub SetDetailsNull()
1504             Me(Me.tableVoucher.DetailsColumn) = Global.System.Convert.DBNull
1505         End Sub
1506         
1507         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1508          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1509         Public Function GetVoucher_OtherDetailsRows() As Voucher_OtherDetailsRow()
1510             If (Me.Table.ChildRelations(
"FK_Voucher_OtherDetails_Voucher") Is Nothing) Then
1511                 Return New Voucher_OtherDetailsRow(-
1) {}
1512             Else
1513                 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations(
"FK_Voucher_OtherDetails_Voucher")),Voucher_OtherDetailsRow())
1514             End If
1515         End Function
1516     End Class
1517     
1518     
'''<summary>
1519     
'''Represents strongly named DataRow class.
1520     
'''</summary>
1521     Partial Public Class Voucher_OtherDetailsRow
1522         Inherits Global.System.Data.DataRow
1523         
1524         Private tableVoucher_OtherDetails As Voucher_OtherDetailsDataTable
1525         
1526         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1527          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1528         Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
1529             MyBase.New(rb)
1530             Me.tableVoucher_OtherDetails = CType(Me.Table,Voucher_OtherDetailsDataTable)
1531         End Sub
1532         
1533         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1534          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1535         Public Property VD_ID() As Integer
1536             Get
1537                 Return CType(Me(Me.tableVoucher_OtherDetails.VD_IDColumn),Integer)
1538             End Get
1539             Set
1540                 Me(Me.tableVoucher_OtherDetails.VD_IDColumn) =
value
1541             End Set
1542         End Property
1543         
1544         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1545          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1546         Public Property VoucherID() As Integer
1547             Get
1548                 Return CType(Me(Me.tableVoucher_OtherDetails.VoucherIDColumn),Integer)
1549             End Get
1550             Set
1551                 Me(Me.tableVoucher_OtherDetails.VoucherIDColumn) =
value
1552             End Set
1553         End Property
1554         
1555         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1556          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1557         Public Property Particulars() As String
1558             Get
1559                 Return CType(Me(Me.tableVoucher_OtherDetails.ParticularsColumn),String)
1560             End Get
1561             Set
1562                 Me(Me.tableVoucher_OtherDetails.ParticularsColumn) =
value
1563             End Set
1564         End Property
1565         
1566         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1567          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1568         Public Property Amount() As Decimal
1569             Get
1570                 Return CType(Me(Me.tableVoucher_OtherDetails.AmountColumn),Decimal)
1571             End Get
1572             Set
1573                 Me(Me.tableVoucher_OtherDetails.AmountColumn) =
value
1574             End Set
1575         End Property
1576         
1577         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1578          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1579         Public Property Note() As String
1580             Get
1581                 Try
1582                     Return CType(Me(Me.tableVoucher_OtherDetails.NoteColumn),String)
1583                 Catch e As Global.System.InvalidCastException
1584                     Throw New Global.System.Data.StrongTypingException(
"The value for column 'Note' in table 'Voucher_OtherDetails' is DBNull.", e)
1585                 End Try
1586             End Get
1587             Set
1588                 Me(Me.tableVoucher_OtherDetails.NoteColumn) =
value
1589             End Set
1590         End Property
1591         
1592         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1593          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1594         Public Property VoucherRow() As VoucherRow
1595             Get
1596                 Return CType(Me.GetParentRow(Me.Table.ParentRelations(
"FK_Voucher_OtherDetails_Voucher")),VoucherRow)
1597             End Get
1598             Set
1599                 Me.SetParentRow(
value, Me.Table.ParentRelations("FK_Voucher_OtherDetails_Voucher"))
1600             End Set
1601         End Property
1602         
1603         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1604          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1605         Public Function IsNoteNull() As Boolean
1606             Return Me.IsNull(Me.tableVoucher_OtherDetails.NoteColumn)
1607         End Function
1608         
1609         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1610          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1611         Public Sub SetNoteNull()
1612             Me(Me.tableVoucher_OtherDetails.NoteColumn) = Global.System.Convert.DBNull
1613         End Sub
1614     End Class
1615     
1616     
'''<summary>
1617     
'''Represents strongly named DataRow class.
1618     
'''</summary>
1619     Partial Public Class CompanyRow
1620         Inherits Global.System.Data.DataRow
1621         
1622         Private tableCompany As CompanyDataTable
1623         
1624         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1625          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1626         Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
1627             MyBase.New(rb)
1628             Me.tableCompany = CType(Me.Table,CompanyDataTable)
1629         End Sub
1630         
1631         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1632          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1633         Public Property ID() As Integer
1634             Get
1635                 Return CType(Me(Me.tableCompany.IDColumn),Integer)
1636             End Get
1637             Set
1638                 Me(Me.tableCompany.IDColumn) =
value
1639             End Set
1640         End Property
1641         
1642         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1643          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1644         Public Property CompanyName() As String
1645             Get
1646                 Return CType(Me(Me.tableCompany.CompanyNameColumn),String)
1647             End Get
1648             Set
1649                 Me(Me.tableCompany.CompanyNameColumn) =
value
1650             End Set
1651         End Property
1652         
1653         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1654          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1655         Public Property Address() As String
1656             Get
1657                 Return CType(Me(Me.tableCompany.AddressColumn),String)
1658             End Get
1659             Set
1660                 Me(Me.tableCompany.AddressColumn) =
value
1661             End Set
1662         End Property
1663         
1664         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1665          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1666         Public Property ContactNo() As String
1667             Get
1668                 Return CType(Me(Me.tableCompany.ContactNoColumn),String)
1669             End Get
1670             Set
1671                 Me(Me.tableCompany.ContactNoColumn) =
value
1672             End Set
1673         End Property
1674         
1675         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1676          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1677         Public Property EmailID() As String
1678             Get
1679                 Return CType(Me(Me.tableCompany.EmailIDColumn),String)
1680             End Get
1681             Set
1682                 Me(Me.tableCompany.EmailIDColumn) =
value
1683             End Set
1684         End Property
1685         
1686         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1687          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1688         Public Property Logo() As Byte()
1689             Get
1690                 Return CType(Me(Me.tableCompany.LogoColumn),Byte())
1691             End Get
1692             Set
1693                 Me(Me.tableCompany.LogoColumn) =
value
1694             End Set
1695         End Property
1696         
1697         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1698          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1699         Public Property TIN() As String
1700             Get
1701                 Try
1702                     Return CType(Me(Me.tableCompany.TINColumn),String)
1703                 Catch e As Global.System.InvalidCastException
1704                     Throw New Global.System.Data.StrongTypingException(
"The value for column 'TIN' in table 'Company' is DBNull.", e)
1705                 End Try
1706             End Get
1707             Set
1708                 Me(Me.tableCompany.TINColumn) =
value
1709             End Set
1710         End Property
1711         
1712         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1713          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1714         Public Property STNo() As String
1715             Get
1716                 Try
1717                     Return CType(Me(Me.tableCompany.STNoColumn),String)
1718                 Catch e As Global.System.InvalidCastException
1719                     Throw New Global.System.Data.StrongTypingException(
"The value for column 'STNo' in table 'Company' is DBNull.", e)
1720                 End Try
1721             End Get
1722             Set
1723                 Me(Me.tableCompany.STNoColumn) =
value
1724             End Set
1725         End Property
1726         
1727         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1728          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1729         Public Property CIN() As String
1730             Get
1731                 Try
1732                     Return CType(Me(Me.tableCompany.CINColumn),String)
1733                 Catch e As Global.System.InvalidCastException
1734                     Throw New Global.System.Data.StrongTypingException(
"The value for column 'CIN' in table 'Company' is DBNull.", e)
1735                 End Try
1736             End Get
1737             Set
1738                 Me(Me.tableCompany.CINColumn) =
value
1739             End Set
1740         End Property
1741         
1742         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1743          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1744         Public Function IsTINNull() As Boolean
1745             Return Me.IsNull(Me.tableCompany.TINColumn)
1746         End Function
1747         
1748         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1749          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1750         Public Sub SetTINNull()
1751             Me(Me.tableCompany.TINColumn) = Global.System.Convert.DBNull
1752         End Sub
1753         
1754         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1755          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1756         Public Function IsSTNoNull() As Boolean
1757             Return Me.IsNull(Me.tableCompany.STNoColumn)
1758         End Function
1759         
1760         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1761          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1762         Public Sub SetSTNoNull()
1763             Me(Me.tableCompany.STNoColumn) = Global.System.Convert.DBNull
1764         End Sub
1765         
1766         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1767          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1768         Public Function IsCINNull() As Boolean
1769             Return Me.IsNull(Me.tableCompany.CINColumn)
1770         End Function
1771         
1772         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1773          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1774         Public Sub SetCINNull()
1775             Me(Me.tableCompany.CINColumn) = Global.System.Convert.DBNull
1776         End Sub
1777     End Class
1778     
1779     
'''<summary>
1780     
'''Row event argument class
1781     
'''</summary>
1782     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1783     Public Class VoucherRowChangeEvent
1784         Inherits Global.System.EventArgs
1785         
1786         Private eventRow As VoucherRow
1787         
1788         Private eventAction As Global.System.Data.DataRowAction
1789         
1790         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1791          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1792         Public Sub New(ByVal row As VoucherRow, ByVal action As Global.System.Data.DataRowAction)
1793             MyBase.New
1794             Me.eventRow = row
1795             Me.eventAction = action
1796         End Sub
1797         
1798         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1799          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1800         Public ReadOnly Property Row() As VoucherRow
1801             Get
1802                 Return Me.eventRow
1803             End Get
1804         End Property
1805         
1806         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1807          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1808         Public ReadOnly Property Action() As Global.System.Data.DataRowAction
1809             Get
1810                 Return Me.eventAction
1811             End Get
1812         End Property
1813     End Class
1814     
1815     
'''<summary>
1816     
'''Row event argument class
1817     
'''</summary>
1818     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1819     Public Class Voucher_OtherDetailsRowChangeEvent
1820         Inherits Global.System.EventArgs
1821         
1822         Private eventRow As Voucher_OtherDetailsRow
1823         
1824         Private eventAction As Global.System.Data.DataRowAction
1825         
1826         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1827          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1828         Public Sub New(ByVal row As Voucher_OtherDetailsRow, ByVal action As Global.System.Data.DataRowAction)
1829             MyBase.New
1830             Me.eventRow = row
1831             Me.eventAction = action
1832         End Sub
1833         
1834         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1835          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1836         Public ReadOnly Property Row() As Voucher_OtherDetailsRow
1837             Get
1838                 Return Me.eventRow
1839             End Get
1840         End Property
1841         
1842         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1843          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1844         Public ReadOnly Property Action() As Global.System.Data.DataRowAction
1845             Get
1846                 Return Me.eventAction
1847             End Get
1848         End Property
1849     End Class
1850     
1851     
'''<summary>
1852     
'''Row event argument class
1853     
'''</summary>
1854     <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1855     Public Class CompanyRowChangeEvent
1856         Inherits Global.System.EventArgs
1857         
1858         Private eventRow As CompanyRow
1859         
1860         Private eventAction As Global.System.Data.DataRowAction
1861         
1862         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1863          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1864         Public Sub New(ByVal row As CompanyRow, ByVal action As Global.System.Data.DataRowAction)
1865             MyBase.New
1866             Me.eventRow = row
1867             Me.eventAction = action
1868         End Sub
1869         
1870         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1871          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1872         Public ReadOnly Property Row() As CompanyRow
1873             Get
1874                 Return Me.eventRow
1875             End Get
1876         End Property
1877         
1878         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1879          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1880         Public ReadOnly Property Action() As Global.System.Data.DataRowAction
1881             Get
1882                 Return Me.eventAction
1883             End Get
1884         End Property
1885     End Class
1886 End Class
1887
1888 Namespace Voucher_DBDataSetTableAdapters
1889     
1890     
'''<summary>
1891     
'''Represents the connection and commands used to retrieve and save data.
1892     
'''</summary>
1893     <Global.System.ComponentModel.DesignerCategoryAttribute(
"code"), _
1894      Global.System.ComponentModel.ToolboxItem(
true), _
1895      Global.System.ComponentModel.DataObjectAttribute(
true), _
1896      Global.System.ComponentModel.DesignerAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
1897         
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
1898      Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
1899     Partial Public Class VoucherTableAdapter
1900         Inherits Global.System.ComponentModel.Component
1901         
1902         Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
1903         
1904         Private _connection As Global.System.Data.SqlClient.SqlConnection
1905         
1906         Private _transaction As Global.System.Data.SqlClient.SqlTransaction
1907         
1908         Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
1909         
1910         Private _clearBeforeFill As Boolean
1911         
1912         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1913          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1914         Public Sub New()
1915             MyBase.New
1916             Me.ClearBeforeFill =
true
1917         End Sub
1918         
1919         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1920          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1921         Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
1922             Get
1923                 If (Me._adapter Is Nothing) Then
1924                     Me.InitAdapter
1925                 End If
1926                 Return Me._adapter
1927             End Get
1928         End Property
1929         
1930         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1931          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1932         Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
1933             Get
1934                 If (Me._connection Is Nothing) Then
1935                     Me.InitConnection
1936                 End If
1937                 Return Me._connection
1938             End Get
1939             Set
1940                 Me._connection =
value
1941                 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
1942                     Me.Adapter.InsertCommand.Connection =
value
1943                 End If
1944                 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
1945                     Me.Adapter.DeleteCommand.Connection =
value
1946                 End If
1947                 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
1948                     Me.Adapter.UpdateCommand.Connection =
value
1949                 End If
1950                 Dim i As Integer =
0
1951                 Do While (i < Me.CommandCollection.Length)
1952                     If (Not (Me.CommandCollection(i)) Is Nothing) Then
1953                         CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection =
value
1954                     End If
1955                     i = (i +
1)
1956                 Loop
1957             End Set
1958         End Property
1959         
1960         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1961          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1962         Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
1963             Get
1964                 Return Me._transaction
1965             End Get
1966             Set
1967                 Me._transaction =
value
1968                 Dim i As Integer =
0
1969                 Do While (i < Me.CommandCollection.Length)
1970                     Me.CommandCollection(i).Transaction = Me._transaction
1971                     i = (i +
1)
1972                 Loop
1973                 If ((Not (Me.Adapter) Is Nothing) _
1974                             AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
1975                     Me.Adapter.DeleteCommand.Transaction = Me._transaction
1976                 End If
1977                 If ((Not (Me.Adapter) Is Nothing) _
1978                             AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
1979                     Me.Adapter.InsertCommand.Transaction = Me._transaction
1980                 End If
1981                 If ((Not (Me.Adapter) Is Nothing) _
1982                             AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
1983                     Me.Adapter.UpdateCommand.Transaction = Me._transaction
1984                 End If
1985             End Set
1986         End Property
1987         
1988         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1989          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1990         Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
1991             Get
1992                 If (Me._commandCollection Is Nothing) Then
1993                     Me.InitCommandCollection
1994                 End If
1995                 Return Me._commandCollection
1996             End Get
1997         End Property
1998         
1999         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2000          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2001         Public Property ClearBeforeFill() As Boolean
2002             Get
2003                 Return Me._clearBeforeFill
2004             End Get
2005             Set
2006                 Me._clearBeforeFill =
value
2007             End Set
2008         End Property
2009         
2010         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2011          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2012         Private Sub InitAdapter()
2013             Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
2014             Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
2015             tableMapping.SourceTable =
"Table"
2016             tableMapping.DataSetTable =
"Voucher"
2017             tableMapping.ColumnMappings.Add(
"Id", "Id")
2018             tableMapping.ColumnMappings.Add(
"VoucherNo", "VoucherNo")
2019             tableMapping.ColumnMappings.Add(
"Name", "Name")
2020             tableMapping.ColumnMappings.Add(
"Date", "Date")
2021             tableMapping.ColumnMappings.Add(
"Details", "Details")
2022             tableMapping.ColumnMappings.Add(
"GrandTotal", "GrandTotal")
2023             Me._adapter.TableMappings.Add(tableMapping)
2024             Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
2025             Me._adapter.DeleteCommand.Connection = Me.Connection
2026             Me._adapter.DeleteCommand.CommandText =
"DELETE FROM [dbo].[Voucher] WHERE (([Id] = @Original_Id) AND ([VoucherNo] = @Orig"& _
2027                 
"inal_VoucherNo) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Origina"& _
2028                 
"l_Name)) AND ([Date] = @Original_Date) AND ((@IsNull_Details = 1 AND [Details] I"& _
2029                 
"S NULL) OR ([Details] = @Original_Details)) AND ([GrandTotal] = @Original_GrandT"& _
2030                 
"otal))"
2031             Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
2032             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Id", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2033             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_VoucherNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2034             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_Name", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2035             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Name", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2036             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Date", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Date", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2037             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_Details", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Details", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2038             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Details", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Details", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2039             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_GrandTotal", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "GrandTotal", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2040             Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
2041             Me._adapter.InsertCommand.Connection = Me.Connection
2042             Me._adapter.InsertCommand.CommandText =
"INSERT INTO [dbo].[Voucher] ([Id], [VoucherNo], [Name], [Date], [Details], [Grand"& _
2043                 
"Total]) VALUES (@Id, @VoucherNo, @Name, @Date, @Details, @GrandTotal);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT I"& _
2044                 
"d, VoucherNo, Name, Date, Details, GrandTotal FROM Voucher WHERE (Id = @Id)"
2045             Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
2046             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Id", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2047             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@VoucherNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2048             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Name", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2049             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Date", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Date", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2050             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Details", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Details", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2051             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@GrandTotal", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "GrandTotal", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2052             Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
2053             Me._adapter.UpdateCommand.Connection = Me.Connection
2054             Me._adapter.UpdateCommand.CommandText =
"UPDATE [dbo].[Voucher] SET [Id] = @Id, [VoucherNo] = @VoucherNo, [Name] = @Name, "& _
2055                 
"[Date] = @Date, [Details] = @Details, [GrandTotal] = @GrandTotal WHERE (([Id] = "& _
2056                 
"@Original_Id) AND ([VoucherNo] = @Original_VoucherNo) AND ((@IsNull_Name = 1 AND"& _
2057                 
" [Name] IS NULL) OR ([Name] = @Original_Name)) AND ([Date] = @Original_Date) AND"& _
2058                 
" ((@IsNull_Details = 1 AND [Details] IS NULL) OR ([Details] = @Original_Details)"& _
2059                 
") AND ([GrandTotal] = @Original_GrandTotal));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Id, VoucherNo, Name, Date,"& _
2060                 
" Details, GrandTotal FROM Voucher WHERE (Id = @Id)"
2061             Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
2062             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Id", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2063             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@VoucherNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2064             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Name", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2065             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Date", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Date", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2066             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Details", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Details", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2067             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@GrandTotal", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "GrandTotal", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2068             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Id", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2069             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_VoucherNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2070             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_Name", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2071             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Name", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2072             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Date", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Date", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2073             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_Details", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Details", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2074             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Details", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Details", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2075             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_GrandTotal", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "GrandTotal", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2076         End Sub
2077         
2078         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2079          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2080         Private Sub InitConnection()
2081             Me._connection = New Global.System.Data.SqlClient.SqlConnection()
2082             Me._connection.ConnectionString = Global.Sales_and_Inventory_System.My.MySettings.Default.SIS_DBConnectionString1
2083         End Sub
2084         
2085         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2086          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2087         Private Sub InitCommandCollection()
2088             Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(
0) {}
2089             Me._commandCollection(
0) = New Global.System.Data.SqlClient.SqlCommand()
2090             Me._commandCollection(
0).Connection = Me.Connection
2091             Me._commandCollection(
0).CommandText = "SELECT Id, VoucherNo, Name, Date, Details, GrandTotal FROM dbo.Voucher"
2092             Me._commandCollection(
0).CommandType = Global.System.Data.CommandType.Text
2093         End Sub
2094         
2095         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2096          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2097          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2098          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill,
true)> _
2099         Public Overloads Overridable Function Fill(ByVal dataTable As Voucher_DBDataSet.VoucherDataTable) As Integer
2100             Me.Adapter.SelectCommand = Me.CommandCollection(
0)
2101             If (Me.ClearBeforeFill =
true) Then
2102                 dataTable.Clear
2103             End If
2104             Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
2105             Return returnValue
2106         End Function
2107         
2108         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2109          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2110          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2111          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select],
true)> _
2112         Public Overloads Overridable Function GetData() As Voucher_DBDataSet.VoucherDataTable
2113             Me.Adapter.SelectCommand = Me.CommandCollection(
0)
2114             Dim dataTable As Voucher_DBDataSet.VoucherDataTable = New Voucher_DBDataSet.VoucherDataTable()
2115             Me.Adapter.Fill(dataTable)
2116             Return dataTable
2117         End Function
2118         
2119         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2120          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2121          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2122         Public Overloads Overridable Function Update(ByVal dataTable As Voucher_DBDataSet.VoucherDataTable) As Integer
2123             Return Me.Adapter.Update(dataTable)
2124         End Function
2125         
2126         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2127          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2128          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2129         Public Overloads Overridable Function Update(ByVal dataSet As Voucher_DBDataSet) As Integer
2130             Return Me.Adapter.Update(dataSet,
"Voucher")
2131         End Function
2132         
2133         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2134          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2135          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2136         Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
2137             Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
2138         End Function
2139         
2140         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2141          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2142          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2143         Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
2144             Return Me.Adapter.Update(dataRows)
2145         End Function
2146         
2147         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2148          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2149          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2150          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete,
true)> _
2151         Public Overloads Overridable Function Delete(ByVal Original_Id As Integer, ByVal Original_VoucherNo As String, ByVal Original_Name As String, ByVal Original_Date As Date, ByVal Original_Details As String, ByVal Original_GrandTotal As Decimal) As Integer
2152             Me.Adapter.DeleteCommand.Parameters(
0).Value = CType(Original_Id,Integer)
2153             If (Original_VoucherNo Is Nothing) Then
2154                 Throw New Global.System.ArgumentNullException(
"Original_VoucherNo")
2155             Else
2156                 Me.Adapter.DeleteCommand.Parameters(
1).Value = CType(Original_VoucherNo,String)
2157             End If
2158             If (Original_Name Is Nothing) Then
2159                 Me.Adapter.DeleteCommand.Parameters(
2).Value = CType(1,Object)
2160                 Me.Adapter.DeleteCommand.Parameters(
3).Value = Global.System.DBNull.Value
2161             Else
2162                 Me.Adapter.DeleteCommand.Parameters(
2).Value = CType(0,Object)
2163                 Me.Adapter.DeleteCommand.Parameters(
3).Value = CType(Original_Name,String)
2164             End If
2165             Me.Adapter.DeleteCommand.Parameters(
4).Value = CType(Original_Date,Date)
2166             If (Original_Details Is Nothing) Then
2167                 Me.Adapter.DeleteCommand.Parameters(
5).Value = CType(1,Object)
2168                 Me.Adapter.DeleteCommand.Parameters(
6).Value = Global.System.DBNull.Value
2169             Else
2170                 Me.Adapter.DeleteCommand.Parameters(
5).Value = CType(0,Object)
2171                 Me.Adapter.DeleteCommand.Parameters(
6).Value = CType(Original_Details,String)
2172             End If
2173             Me.Adapter.DeleteCommand.Parameters(
7).Value = CType(Original_GrandTotal,Decimal)
2174             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
2175             If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2176                         <> Global.System.Data.ConnectionState.Open) Then
2177                 Me.Adapter.DeleteCommand.Connection.Open
2178             End If
2179             Try
2180                 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
2181                 Return returnValue
2182             Finally
2183                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2184                     Me.Adapter.DeleteCommand.Connection.Close
2185                 End If
2186             End Try
2187         End Function
2188         
2189         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2190          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2191          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2192          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert,
true)> _
2193         Public Overloads Overridable Function Insert(ByVal Id As Integer, ByVal VoucherNo As String, ByVal Name As String, ByVal _Date As Date, ByVal Details As String, ByVal GrandTotal As Decimal) As Integer
2194             Me.Adapter.InsertCommand.Parameters(
0).Value = CType(Id,Integer)
2195             If (VoucherNo Is Nothing) Then
2196                 Throw New Global.System.ArgumentNullException(
"VoucherNo")
2197             Else
2198                 Me.Adapter.InsertCommand.Parameters(
1).Value = CType(VoucherNo,String)
2199             End If
2200             If (Name Is Nothing) Then
2201                 Me.Adapter.InsertCommand.Parameters(
2).Value = Global.System.DBNull.Value
2202             Else
2203                 Me.Adapter.InsertCommand.Parameters(
2).Value = CType(Name,String)
2204             End If
2205             Me.Adapter.InsertCommand.Parameters(
3).Value = CType(_Date,Date)
2206             If (Details Is Nothing) Then
2207                 Me.Adapter.InsertCommand.Parameters(
4).Value = Global.System.DBNull.Value
2208             Else
2209                 Me.Adapter.InsertCommand.Parameters(
4).Value = CType(Details,String)
2210             End If
2211             Me.Adapter.InsertCommand.Parameters(
5).Value = CType(GrandTotal,Decimal)
2212             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
2213             If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2214                         <> Global.System.Data.ConnectionState.Open) Then
2215                 Me.Adapter.InsertCommand.Connection.Open
2216             End If
2217             Try
2218                 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
2219                 Return returnValue
2220             Finally
2221                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2222                     Me.Adapter.InsertCommand.Connection.Close
2223                 End If
2224             End Try
2225         End Function
2226         
2227         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2228          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2229          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2230          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update,
true)> _
2231         Public Overloads Overridable Function Update(ByVal Id As Integer, ByVal VoucherNo As String, ByVal Name As String, ByVal _Date As Date, ByVal Details As String, ByVal GrandTotal As Decimal, ByVal Original_Id As Integer, ByVal Original_VoucherNo As String, ByVal Original_Name As String, ByVal Original_Date As Date, ByVal Original_Details As String, ByVal Original_GrandTotal As Decimal) As Integer
2232             Me.Adapter.UpdateCommand.Parameters(
0).Value = CType(Id,Integer)
2233             If (VoucherNo Is Nothing) Then
2234                 Throw New Global.System.ArgumentNullException(
"VoucherNo")
2235             Else
2236                 Me.Adapter.UpdateCommand.Parameters(
1).Value = CType(VoucherNo,String)
2237             End If
2238             If (Name Is Nothing) Then
2239                 Me.Adapter.UpdateCommand.Parameters(
2).Value = Global.System.DBNull.Value
2240             Else
2241                 Me.Adapter.UpdateCommand.Parameters(
2).Value = CType(Name,String)
2242             End If
2243             Me.Adapter.UpdateCommand.Parameters(
3).Value = CType(_Date,Date)
2244             If (Details Is Nothing) Then
2245                 Me.Adapter.UpdateCommand.Parameters(
4).Value = Global.System.DBNull.Value
2246             Else
2247                 Me.Adapter.UpdateCommand.Parameters(
4).Value = CType(Details,String)
2248             End If
2249             Me.Adapter.UpdateCommand.Parameters(
5).Value = CType(GrandTotal,Decimal)
2250             Me.Adapter.UpdateCommand.Parameters(
6).Value = CType(Original_Id,Integer)
2251             If (Original_VoucherNo Is Nothing) Then
2252                 Throw New Global.System.ArgumentNullException(
"Original_VoucherNo")
2253             Else
2254                 Me.Adapter.UpdateCommand.Parameters(
7).Value = CType(Original_VoucherNo,String)
2255             End If
2256             If (Original_Name Is Nothing) Then
2257                 Me.Adapter.UpdateCommand.Parameters(
8).Value = CType(1,Object)
2258                 Me.Adapter.UpdateCommand.Parameters(
9).Value = Global.System.DBNull.Value
2259             Else
2260                 Me.Adapter.UpdateCommand.Parameters(
8).Value = CType(0,Object)
2261                 Me.Adapter.UpdateCommand.Parameters(
9).Value = CType(Original_Name,String)
2262             End If
2263             Me.Adapter.UpdateCommand.Parameters(
10).Value = CType(Original_Date,Date)
2264             If (Original_Details Is Nothing) Then
2265                 Me.Adapter.UpdateCommand.Parameters(
11).Value = CType(1,Object)
2266                 Me.Adapter.UpdateCommand.Parameters(
12).Value = Global.System.DBNull.Value
2267             Else
2268                 Me.Adapter.UpdateCommand.Parameters(
11).Value = CType(0,Object)
2269                 Me.Adapter.UpdateCommand.Parameters(
12).Value = CType(Original_Details,String)
2270             End If
2271             Me.Adapter.UpdateCommand.Parameters(
13).Value = CType(Original_GrandTotal,Decimal)
2272             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
2273             If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2274                         <> Global.System.Data.ConnectionState.Open) Then
2275                 Me.Adapter.UpdateCommand.Connection.Open
2276             End If
2277             Try
2278                 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
2279                 Return returnValue
2280             Finally
2281                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2282                     Me.Adapter.UpdateCommand.Connection.Close
2283                 End If
2284             End Try
2285         End Function
2286         
2287         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2288          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2289          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2290          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update,
true)> _
2291         Public Overloads Overridable Function Update(ByVal VoucherNo As String, ByVal Name As String, ByVal _Date As Date, ByVal Details As String, ByVal GrandTotal As Decimal, ByVal Original_Id As Integer, ByVal Original_VoucherNo As String, ByVal Original_Name As String, ByVal Original_Date As Date, ByVal Original_Details As String, ByVal Original_GrandTotal As Decimal) As Integer
2292             Return Me.Update(Original_Id, VoucherNo, Name, _Date, Details, GrandTotal, Original_Id, Original_VoucherNo, Original_Name, Original_Date, Original_Details, Original_GrandTotal)
2293         End Function
2294     End Class
2295     
2296     
'''<summary>
2297     
'''Represents the connection and commands used to retrieve and save data.
2298     
'''</summary>
2299     <Global.System.ComponentModel.DesignerCategoryAttribute(
"code"), _
2300      Global.System.ComponentModel.ToolboxItem(
true), _
2301      Global.System.ComponentModel.DataObjectAttribute(
true), _
2302      Global.System.ComponentModel.DesignerAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
2303         
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
2304      Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2305     Partial Public Class Voucher_OtherDetailsTableAdapter
2306         Inherits Global.System.ComponentModel.Component
2307         
2308         Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
2309         
2310         Private _connection As Global.System.Data.SqlClient.SqlConnection
2311         
2312         Private _transaction As Global.System.Data.SqlClient.SqlTransaction
2313         
2314         Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
2315         
2316         Private _clearBeforeFill As Boolean
2317         
2318         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2319          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2320         Public Sub New()
2321             MyBase.New
2322             Me.ClearBeforeFill =
true
2323         End Sub
2324         
2325         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2326          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2327         Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
2328             Get
2329                 If (Me._adapter Is Nothing) Then
2330                     Me.InitAdapter
2331                 End If
2332                 Return Me._adapter
2333             End Get
2334         End Property
2335         
2336         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2337          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2338         Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
2339             Get
2340                 If (Me._connection Is Nothing) Then
2341                     Me.InitConnection
2342                 End If
2343                 Return Me._connection
2344             End Get
2345             Set
2346                 Me._connection =
value
2347                 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
2348                     Me.Adapter.InsertCommand.Connection =
value
2349                 End If
2350                 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
2351                     Me.Adapter.DeleteCommand.Connection =
value
2352                 End If
2353                 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
2354                     Me.Adapter.UpdateCommand.Connection =
value
2355                 End If
2356                 Dim i As Integer =
0
2357                 Do While (i < Me.CommandCollection.Length)
2358                     If (Not (Me.CommandCollection(i)) Is Nothing) Then
2359                         CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection =
value
2360                     End If
2361                     i = (i +
1)
2362                 Loop
2363             End Set
2364         End Property
2365         
2366         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2367          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2368         Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
2369             Get
2370                 Return Me._transaction
2371             End Get
2372             Set
2373                 Me._transaction =
value
2374                 Dim i As Integer =
0
2375                 Do While (i < Me.CommandCollection.Length)
2376                     Me.CommandCollection(i).Transaction = Me._transaction
2377                     i = (i +
1)
2378                 Loop
2379                 If ((Not (Me.Adapter) Is Nothing) _
2380                             AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
2381                     Me.Adapter.DeleteCommand.Transaction = Me._transaction
2382                 End If
2383                 If ((Not (Me.Adapter) Is Nothing) _
2384                             AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
2385                     Me.Adapter.InsertCommand.Transaction = Me._transaction
2386                 End If
2387                 If ((Not (Me.Adapter) Is Nothing) _
2388                             AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
2389                     Me.Adapter.UpdateCommand.Transaction = Me._transaction
2390                 End If
2391             End Set
2392         End Property
2393         
2394         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2395          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2396         Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
2397             Get
2398                 If (Me._commandCollection Is Nothing) Then
2399                     Me.InitCommandCollection
2400                 End If
2401                 Return Me._commandCollection
2402             End Get
2403         End Property
2404         
2405         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2406          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2407         Public Property ClearBeforeFill() As Boolean
2408             Get
2409                 Return Me._clearBeforeFill
2410             End Get
2411             Set
2412                 Me._clearBeforeFill =
value
2413             End Set
2414         End Property
2415         
2416         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2417          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2418         Private Sub InitAdapter()
2419             Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
2420             Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
2421             tableMapping.SourceTable =
"Table"
2422             tableMapping.DataSetTable =
"Voucher_OtherDetails"
2423             tableMapping.ColumnMappings.Add(
"VD_ID", "VD_ID")
2424             tableMapping.ColumnMappings.Add(
"VoucherID", "VoucherID")
2425             tableMapping.ColumnMappings.Add(
"Particulars", "Particulars")
2426             tableMapping.ColumnMappings.Add(
"Amount", "Amount")
2427             tableMapping.ColumnMappings.Add(
"Note", "Note")
2428             Me._adapter.TableMappings.Add(tableMapping)
2429             Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
2430             Me._adapter.DeleteCommand.Connection = Me.Connection
2431             Me._adapter.DeleteCommand.CommandText =
"DELETE FROM [dbo].[Voucher_OtherDetails] WHERE (([VD_ID] = @Original_VD_ID) AND ("& _
2432                 
"[VoucherID] = @Original_VoucherID) AND ([Particulars] = @Original_Particulars) A"& _
2433                 
"ND ([Amount] = @Original_Amount))"
2434             Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
2435             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_VD_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VD_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2436             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_VoucherID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2437             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Particulars", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Particulars", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2438             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Amount", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "Amount", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2439             Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
2440             Me._adapter.InsertCommand.Connection = Me.Connection
2441             Me._adapter.InsertCommand.CommandText =
"INSERT INTO [dbo].[Voucher_OtherDetails] ([VoucherID], [Particulars], [Amount], ["& _
2442                 
"Note]) VALUES (@VoucherID, @Particulars, @Amount, @Note);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT VD_ID, Voucher"& _
2443                 
"ID, Particulars, Amount, Note FROM Voucher_OtherDetails WHERE (VD_ID = SCOPE_IDE"& _
2444                 
"NTITY())"
2445             Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
2446             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@VoucherID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2447             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Particulars", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Particulars", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2448             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Amount", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "Amount", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2449             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Note", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Note", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2450             Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
2451             Me._adapter.UpdateCommand.Connection = Me.Connection
2452             Me._adapter.UpdateCommand.CommandText =
"UPDATE [dbo].[Voucher_OtherDetails] SET [VoucherID] = @VoucherID, [Particulars] ="& _
2453                 
" @Particulars, [Amount] = @Amount, [Note] = @Note WHERE (([VD_ID] = @Original_VD"& _
2454                 
"_ID) AND ([VoucherID] = @Original_VoucherID) AND ([Particulars] = @Original_Part"& _
2455                 
"iculars) AND ([Amount] = @Original_Amount));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT VD_ID, VoucherID, Particula"& _
2456                 
"rs, Amount, Note FROM Voucher_OtherDetails WHERE (VD_ID = @VD_ID)"
2457             Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
2458             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@VoucherID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2459             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Particulars", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Particulars", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2460             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Amount", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "Amount", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2461             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Note", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Note", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2462             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_VD_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VD_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2463             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_VoucherID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "VoucherID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2464             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Particulars", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Particulars", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2465             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Amount", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 18, 2, "Amount", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2466             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@VD_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "VD_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2467         End Sub
2468         
2469         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2470          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2471         Private Sub InitConnection()
2472             Me._connection = New Global.System.Data.SqlClient.SqlConnection()
2473             Me._connection.ConnectionString = Global.Sales_and_Inventory_System.My.MySettings.Default.SIS_DBConnectionString1
2474         End Sub
2475         
2476         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2477          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2478         Private Sub InitCommandCollection()
2479             Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(
0) {}
2480             Me._commandCollection(
0) = New Global.System.Data.SqlClient.SqlCommand()
2481             Me._commandCollection(
0).Connection = Me.Connection
2482             Me._commandCollection(
0).CommandText = "SELECT VD_ID, VoucherID, Particulars, Amount, Note FROM dbo.Voucher_OtherDetails"
2483             Me._commandCollection(
0).CommandType = Global.System.Data.CommandType.Text
2484         End Sub
2485         
2486         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2487          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2488          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2489          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill,
true)> _
2490         Public Overloads Overridable Function Fill(ByVal dataTable As Voucher_DBDataSet.Voucher_OtherDetailsDataTable) As Integer
2491             Me.Adapter.SelectCommand = Me.CommandCollection(
0)
2492             If (Me.ClearBeforeFill =
true) Then
2493                 dataTable.Clear
2494             End If
2495             Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
2496             Return returnValue
2497         End Function
2498         
2499         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2500          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2501          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2502          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select],
true)> _
2503         Public Overloads Overridable Function GetData() As Voucher_DBDataSet.Voucher_OtherDetailsDataTable
2504             Me.Adapter.SelectCommand = Me.CommandCollection(
0)
2505             Dim dataTable As Voucher_DBDataSet.Voucher_OtherDetailsDataTable = New Voucher_DBDataSet.Voucher_OtherDetailsDataTable()
2506             Me.Adapter.Fill(dataTable)
2507             Return dataTable
2508         End Function
2509         
2510         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2511          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2512          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2513         Public Overloads Overridable Function Update(ByVal dataTable As Voucher_DBDataSet.Voucher_OtherDetailsDataTable) As Integer
2514             Return Me.Adapter.Update(dataTable)
2515         End Function
2516         
2517         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2518          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2519          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2520         Public Overloads Overridable Function Update(ByVal dataSet As Voucher_DBDataSet) As Integer
2521             Return Me.Adapter.Update(dataSet,
"Voucher_OtherDetails")
2522         End Function
2523         
2524         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2525          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2526          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2527         Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
2528             Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
2529         End Function
2530         
2531         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2532          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2533          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2534         Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
2535             Return Me.Adapter.Update(dataRows)
2536         End Function
2537         
2538         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2539          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2540          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2541          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete,
true)> _
2542         Public Overloads Overridable Function Delete(ByVal Original_VD_ID As Integer, ByVal Original_VoucherID As Integer, ByVal Original_Particulars As String, ByVal Original_Amount As Decimal) As Integer
2543             Me.Adapter.DeleteCommand.Parameters(
0).Value = CType(Original_VD_ID,Integer)
2544             Me.Adapter.DeleteCommand.Parameters(
1).Value = CType(Original_VoucherID,Integer)
2545             If (Original_Particulars Is Nothing) Then
2546                 Throw New Global.System.ArgumentNullException(
"Original_Particulars")
2547             Else
2548                 Me.Adapter.DeleteCommand.Parameters(
2).Value = CType(Original_Particulars,String)
2549             End If
2550             Me.Adapter.DeleteCommand.Parameters(
3).Value = CType(Original_Amount,Decimal)
2551             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
2552             If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2553                         <> Global.System.Data.ConnectionState.Open) Then
2554                 Me.Adapter.DeleteCommand.Connection.Open
2555             End If
2556             Try
2557                 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
2558                 Return returnValue
2559             Finally
2560                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2561                     Me.Adapter.DeleteCommand.Connection.Close
2562                 End If
2563             End Try
2564         End Function
2565         
2566         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2567          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2568          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2569          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert,
true)> _
2570         Public Overloads Overridable Function Insert(ByVal VoucherID As Integer, ByVal Particulars As String, ByVal Amount As Decimal, ByVal Note As String) As Integer
2571             Me.Adapter.InsertCommand.Parameters(
0).Value = CType(VoucherID,Integer)
2572             If (Particulars Is Nothing) Then
2573                 Throw New Global.System.ArgumentNullException(
"Particulars")
2574             Else
2575                 Me.Adapter.InsertCommand.Parameters(
1).Value = CType(Particulars,String)
2576             End If
2577             Me.Adapter.InsertCommand.Parameters(
2).Value = CType(Amount,Decimal)
2578             If (Note Is Nothing) Then
2579                 Me.Adapter.InsertCommand.Parameters(
3).Value = Global.System.DBNull.Value
2580             Else
2581                 Me.Adapter.InsertCommand.Parameters(
3).Value = CType(Note,String)
2582             End If
2583             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
2584             If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2585                         <> Global.System.Data.ConnectionState.Open) Then
2586                 Me.Adapter.InsertCommand.Connection.Open
2587             End If
2588             Try
2589                 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
2590                 Return returnValue
2591             Finally
2592                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2593                     Me.Adapter.InsertCommand.Connection.Close
2594                 End If
2595             End Try
2596         End Function
2597         
2598         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2599          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2600          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2601          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update,
true)> _
2602         Public Overloads Overridable Function Update(ByVal VoucherID As Integer, ByVal Particulars As String, ByVal Amount As Decimal, ByVal Note As String, ByVal Original_VD_ID As Integer, ByVal Original_VoucherID As Integer, ByVal Original_Particulars As String, ByVal Original_Amount As Decimal, ByVal VD_ID As Integer) As Integer
2603             Me.Adapter.UpdateCommand.Parameters(
0).Value = CType(VoucherID,Integer)
2604             If (Particulars Is Nothing) Then
2605                 Throw New Global.System.ArgumentNullException(
"Particulars")
2606             Else
2607                 Me.Adapter.UpdateCommand.Parameters(
1).Value = CType(Particulars,String)
2608             End If
2609             Me.Adapter.UpdateCommand.Parameters(
2).Value = CType(Amount,Decimal)
2610             If (Note Is Nothing) Then
2611                 Me.Adapter.UpdateCommand.Parameters(
3).Value = Global.System.DBNull.Value
2612             Else
2613                 Me.Adapter.UpdateCommand.Parameters(
3).Value = CType(Note,String)
2614             End If
2615             Me.Adapter.UpdateCommand.Parameters(
4).Value = CType(Original_VD_ID,Integer)
2616             Me.Adapter.UpdateCommand.Parameters(
5).Value = CType(Original_VoucherID,Integer)
2617             If (Original_Particulars Is Nothing) Then
2618                 Throw New Global.System.ArgumentNullException(
"Original_Particulars")
2619             Else
2620                 Me.Adapter.UpdateCommand.Parameters(
6).Value = CType(Original_Particulars,String)
2621             End If
2622             Me.Adapter.UpdateCommand.Parameters(
7).Value = CType(Original_Amount,Decimal)
2623             Me.Adapter.UpdateCommand.Parameters(
8).Value = CType(VD_ID,Integer)
2624             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
2625             If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2626                         <> Global.System.Data.ConnectionState.Open) Then
2627                 Me.Adapter.UpdateCommand.Connection.Open
2628             End If
2629             Try
2630                 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
2631                 Return returnValue
2632             Finally
2633                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2634                     Me.Adapter.UpdateCommand.Connection.Close
2635                 End If
2636             End Try
2637         End Function
2638         
2639         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2640          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2641          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2642          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update,
true)> _
2643         Public Overloads Overridable Function Update(ByVal VoucherID As Integer, ByVal Particulars As String, ByVal Amount As Decimal, ByVal Note As String, ByVal Original_VD_ID As Integer, ByVal Original_VoucherID As Integer, ByVal Original_Particulars As String, ByVal Original_Amount As Decimal) As Integer
2644             Return Me.Update(VoucherID, Particulars, Amount, Note, Original_VD_ID, Original_VoucherID, Original_Particulars, Original_Amount, Original_VD_ID)
2645         End Function
2646     End Class
2647     
2648     
'''<summary>
2649     
'''Represents the connection and commands used to retrieve and save data.
2650     
'''</summary>
2651     <Global.System.ComponentModel.DesignerCategoryAttribute(
"code"), _
2652      Global.System.ComponentModel.ToolboxItem(
true), _
2653      Global.System.ComponentModel.DataObjectAttribute(
true), _
2654      Global.System.ComponentModel.DesignerAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
2655         
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
2656      Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2657     Partial Public Class CompanyTableAdapter
2658         Inherits Global.System.ComponentModel.Component
2659         
2660         Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
2661         
2662         Private _connection As Global.System.Data.SqlClient.SqlConnection
2663         
2664         Private _transaction As Global.System.Data.SqlClient.SqlTransaction
2665         
2666         Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
2667         
2668         Private _clearBeforeFill As Boolean
2669         
2670         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2671          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2672         Public Sub New()
2673             MyBase.New
2674             Me.ClearBeforeFill =
true
2675         End Sub
2676         
2677         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2678          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2679         Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
2680             Get
2681                 If (Me._adapter Is Nothing) Then
2682                     Me.InitAdapter
2683                 End If
2684                 Return Me._adapter
2685             End Get
2686         End Property
2687         
2688         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2689          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2690         Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
2691             Get
2692                 If (Me._connection Is Nothing) Then
2693                     Me.InitConnection
2694                 End If
2695                 Return Me._connection
2696             End Get
2697             Set
2698                 Me._connection =
value
2699                 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
2700                     Me.Adapter.InsertCommand.Connection =
value
2701                 End If
2702                 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
2703                     Me.Adapter.DeleteCommand.Connection =
value
2704                 End If
2705                 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
2706                     Me.Adapter.UpdateCommand.Connection =
value
2707                 End If
2708                 Dim i As Integer =
0
2709                 Do While (i < Me.CommandCollection.Length)
2710                     If (Not (Me.CommandCollection(i)) Is Nothing) Then
2711                         CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection =
value
2712                     End If
2713                     i = (i +
1)
2714                 Loop
2715             End Set
2716         End Property
2717         
2718         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2719          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2720         Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
2721             Get
2722                 Return Me._transaction
2723             End Get
2724             Set
2725                 Me._transaction =
value
2726                 Dim i As Integer =
0
2727                 Do While (i < Me.CommandCollection.Length)
2728                     Me.CommandCollection(i).Transaction = Me._transaction
2729                     i = (i +
1)
2730                 Loop
2731                 If ((Not (Me.Adapter) Is Nothing) _
2732                             AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
2733                     Me.Adapter.DeleteCommand.Transaction = Me._transaction
2734                 End If
2735                 If ((Not (Me.Adapter) Is Nothing) _
2736                             AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
2737                     Me.Adapter.InsertCommand.Transaction = Me._transaction
2738                 End If
2739                 If ((Not (Me.Adapter) Is Nothing) _
2740                             AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
2741                     Me.Adapter.UpdateCommand.Transaction = Me._transaction
2742                 End If
2743             End Set
2744         End Property
2745         
2746         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2747          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2748         Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
2749             Get
2750                 If (Me._commandCollection Is Nothing) Then
2751                     Me.InitCommandCollection
2752                 End If
2753                 Return Me._commandCollection
2754             End Get
2755         End Property
2756         
2757         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2758          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2759         Public Property ClearBeforeFill() As Boolean
2760             Get
2761                 Return Me._clearBeforeFill
2762             End Get
2763             Set
2764                 Me._clearBeforeFill =
value
2765             End Set
2766         End Property
2767         
2768         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2769          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2770         Private Sub InitAdapter()
2771             Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
2772             Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
2773             tableMapping.SourceTable =
"Table"
2774             tableMapping.DataSetTable =
"Company"
2775             tableMapping.ColumnMappings.Add(
"ID", "ID")
2776             tableMapping.ColumnMappings.Add(
"CompanyName", "CompanyName")
2777             tableMapping.ColumnMappings.Add(
"Address", "Address")
2778             tableMapping.ColumnMappings.Add(
"ContactNo", "ContactNo")
2779             tableMapping.ColumnMappings.Add(
"EmailID", "EmailID")
2780             tableMapping.ColumnMappings.Add(
"Logo", "Logo")
2781             tableMapping.ColumnMappings.Add(
"TIN", "TIN")
2782             tableMapping.ColumnMappings.Add(
"STNo", "STNo")
2783             tableMapping.ColumnMappings.Add(
"CIN", "CIN")
2784             Me._adapter.TableMappings.Add(tableMapping)
2785             Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
2786             Me._adapter.DeleteCommand.Connection = Me.Connection
2787             Me._adapter.DeleteCommand.CommandText =
"DELETE FROM [dbo].[Company] WHERE (([ID] = @Original_ID) AND ([CompanyName] = @Or"& _
2788                 
"iginal_CompanyName) AND ([Address] = @Original_Address) AND ([ContactNo] = @Orig"& _
2789                 
"inal_ContactNo) AND ([EmailID] = @Original_EmailID) AND ((@IsNull_TIN = 1 AND [T"& _
2790                 
"IN] IS NULL) OR ([TIN] = @Original_TIN)) AND ((@IsNull_STNo = 1 AND [STNo] IS NU"& _
2791                 
"LL) OR ([STNo] = @Original_STNo)) AND ((@IsNull_CIN = 1 AND [CIN] IS NULL) OR (["& _
2792                 
"CIN] = @Original_CIN)))"
2793             Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
2794             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2795             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_CompanyName", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CompanyName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2796             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Address", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Address", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2797             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_ContactNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ContactNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2798             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_EmailID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EmailID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2799             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_TIN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TIN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2800             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_TIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TIN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2801             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_STNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "STNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2802             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_STNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "STNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2803             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_CIN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CIN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2804             Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_CIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CIN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2805             Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
2806             Me._adapter.InsertCommand.Connection = Me.Connection
2807             Me._adapter.InsertCommand.CommandText =
"INSERT INTO [dbo].[Company] ([CompanyName], [Address], [ContactNo], [EmailID], [L"& _
2808                 
"ogo], [TIN], [STNo], [CIN]) VALUES (@CompanyName, @Address, @ContactNo, @EmailID"& _
2809                 
", @Logo, @TIN, @STNo, @CIN);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT ID, CompanyName, Address, ContactNo, EmailI"& _
2810                 
"D, Logo, TIN, STNo, CIN FROM Company WHERE (ID = SCOPE_IDENTITY())"
2811             Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
2812             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@CompanyName", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CompanyName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2813             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Address", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Address", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2814             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@ContactNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ContactNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2815             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@EmailID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EmailID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2816             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Logo", Global.System.Data.SqlDbType.Image, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Logo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2817             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@TIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TIN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2818             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@STNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "STNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2819             Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@CIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CIN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2820             Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
2821             Me._adapter.UpdateCommand.Connection = Me.Connection
2822             Me._adapter.UpdateCommand.CommandText =
"UPDATE [dbo].[Company] SET [CompanyName] = @CompanyName, [Address] = @Address, [C"& _
2823                 
"ontactNo] = @ContactNo, [EmailID] = @EmailID, [Logo] = @Logo, [TIN] = @TIN, [STN"& _
2824                 
"o] = @STNo, [CIN] = @CIN WHERE (([ID] = @Original_ID) AND ([CompanyName] = @Orig"& _
2825                 
"inal_CompanyName) AND ([Address] = @Original_Address) AND ([ContactNo] = @Origin"& _
2826                 
"al_ContactNo) AND ([EmailID] = @Original_EmailID) AND ((@IsNull_TIN = 1 AND [TIN"& _
2827                 
"] IS NULL) OR ([TIN] = @Original_TIN)) AND ((@IsNull_STNo = 1 AND [STNo] IS NULL"& _
2828                 
") OR ([STNo] = @Original_STNo)) AND ((@IsNull_CIN = 1 AND [CIN] IS NULL) OR ([CI"& _
2829                 
"N] = @Original_CIN)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT ID, CompanyName, Address, ContactNo, EmailID, Log"& _
2830                 
"o, TIN, STNo, CIN FROM Company WHERE (ID = @ID)"
2831             Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
2832             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@CompanyName", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CompanyName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2833             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Address", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Address", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2834             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@ContactNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ContactNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2835             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@EmailID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EmailID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2836             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Logo", Global.System.Data.SqlDbType.Image, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Logo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2837             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@TIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TIN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2838             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@STNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "STNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2839             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@CIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CIN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2840             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2841             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_CompanyName", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CompanyName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2842             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_Address", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Address", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2843             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_ContactNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ContactNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2844             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_EmailID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EmailID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2845             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_TIN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TIN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2846             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_TIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TIN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2847             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_STNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "STNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2848             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_STNo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "STNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2849             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@IsNull_CIN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CIN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
2850             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@Original_CIN", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CIN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
2851             Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter(
"@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
2852         End Sub
2853         
2854         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2855          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2856         Private Sub InitConnection()
2857             Me._connection = New Global.System.Data.SqlClient.SqlConnection()
2858             Me._connection.ConnectionString = Global.Sales_and_Inventory_System.My.MySettings.Default.SIS_DBConnectionString1
2859         End Sub
2860         
2861         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2862          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
2863         Private Sub InitCommandCollection()
2864             Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(
0) {}
2865             Me._commandCollection(
0) = New Global.System.Data.SqlClient.SqlCommand()
2866             Me._commandCollection(
0).Connection = Me.Connection
2867             Me._commandCollection(
0).CommandText = "SELECT ID, CompanyName, Address, ContactNo, EmailID, Logo, TIN, STNo, CIN FROM db"& _
2868                 
"o.Company"
2869             Me._commandCollection(
0).CommandType = Global.System.Data.CommandType.Text
2870         End Sub
2871         
2872         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2873          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2874          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2875          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill,
true)> _
2876         Public Overloads Overridable Function Fill(ByVal dataTable As Voucher_DBDataSet.CompanyDataTable) As Integer
2877             Me.Adapter.SelectCommand = Me.CommandCollection(
0)
2878             If (Me.ClearBeforeFill =
true) Then
2879                 dataTable.Clear
2880             End If
2881             Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
2882             Return returnValue
2883         End Function
2884         
2885         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2886          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2887          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2888          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select],
true)> _
2889         Public Overloads Overridable Function GetData() As Voucher_DBDataSet.CompanyDataTable
2890             Me.Adapter.SelectCommand = Me.CommandCollection(
0)
2891             Dim dataTable As Voucher_DBDataSet.CompanyDataTable = New Voucher_DBDataSet.CompanyDataTable()
2892             Me.Adapter.Fill(dataTable)
2893             Return dataTable
2894         End Function
2895         
2896         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2897          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2898          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2899         Public Overloads Overridable Function Update(ByVal dataTable As Voucher_DBDataSet.CompanyDataTable) As Integer
2900             Return Me.Adapter.Update(dataTable)
2901         End Function
2902         
2903         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2904          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2905          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2906         Public Overloads Overridable Function Update(ByVal dataSet As Voucher_DBDataSet) As Integer
2907             Return Me.Adapter.Update(dataSet,
"Company")
2908         End Function
2909         
2910         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2911          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2912          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2913         Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
2914             Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
2915         End Function
2916         
2917         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2918          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2919          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter")> _
2920         Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
2921             Return Me.Adapter.Update(dataRows)
2922         End Function
2923         
2924         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2925          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2926          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2927          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete,
true)> _
2928         Public Overloads Overridable Function Delete(ByVal Original_ID As Integer, ByVal Original_CompanyName As String, ByVal Original_Address As String, ByVal Original_ContactNo As String, ByVal Original_EmailID As String, ByVal Original_TIN As String, ByVal Original_STNo As String, ByVal Original_CIN As String) As Integer
2929             Me.Adapter.DeleteCommand.Parameters(
0).Value = CType(Original_ID,Integer)
2930             If (Original_CompanyName Is Nothing) Then
2931                 Throw New Global.System.ArgumentNullException(
"Original_CompanyName")
2932             Else
2933                 Me.Adapter.DeleteCommand.Parameters(
1).Value = CType(Original_CompanyName,String)
2934             End If
2935             If (Original_Address Is Nothing) Then
2936                 Throw New Global.System.ArgumentNullException(
"Original_Address")
2937             Else
2938                 Me.Adapter.DeleteCommand.Parameters(
2).Value = CType(Original_Address,String)
2939             End If
2940             If (Original_ContactNo Is Nothing) Then
2941                 Throw New Global.System.ArgumentNullException(
"Original_ContactNo")
2942             Else
2943                 Me.Adapter.DeleteCommand.Parameters(
3).Value = CType(Original_ContactNo,String)
2944             End If
2945             If (Original_EmailID Is Nothing) Then
2946                 Throw New Global.System.ArgumentNullException(
"Original_EmailID")
2947             Else
2948                 Me.Adapter.DeleteCommand.Parameters(
4).Value = CType(Original_EmailID,String)
2949             End If
2950             If (Original_TIN Is Nothing) Then
2951                 Me.Adapter.DeleteCommand.Parameters(
5).Value = CType(1,Object)
2952                 Me.Adapter.DeleteCommand.Parameters(
6).Value = Global.System.DBNull.Value
2953             Else
2954                 Me.Adapter.DeleteCommand.Parameters(
5).Value = CType(0,Object)
2955                 Me.Adapter.DeleteCommand.Parameters(
6).Value = CType(Original_TIN,String)
2956             End If
2957             If (Original_STNo Is Nothing) Then
2958                 Me.Adapter.DeleteCommand.Parameters(
7).Value = CType(1,Object)
2959                 Me.Adapter.DeleteCommand.Parameters(
8).Value = Global.System.DBNull.Value
2960             Else
2961                 Me.Adapter.DeleteCommand.Parameters(
7).Value = CType(0,Object)
2962                 Me.Adapter.DeleteCommand.Parameters(
8).Value = CType(Original_STNo,String)
2963             End If
2964             If (Original_CIN Is Nothing) Then
2965                 Me.Adapter.DeleteCommand.Parameters(
9).Value = CType(1,Object)
2966                 Me.Adapter.DeleteCommand.Parameters(
10).Value = Global.System.DBNull.Value
2967             Else
2968                 Me.Adapter.DeleteCommand.Parameters(
9).Value = CType(0,Object)
2969                 Me.Adapter.DeleteCommand.Parameters(
10).Value = CType(Original_CIN,String)
2970             End If
2971             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
2972             If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
2973                         <> Global.System.Data.ConnectionState.Open) Then
2974                 Me.Adapter.DeleteCommand.Connection.Open
2975             End If
2976             Try
2977                 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
2978                 Return returnValue
2979             Finally
2980                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
2981                     Me.Adapter.DeleteCommand.Connection.Close
2982                 End If
2983             End Try
2984         End Function
2985         
2986         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2987          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
2988          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
2989          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert,
true)> _
2990         Public Overloads Overridable Function Insert(ByVal CompanyName As String, ByVal Address As String, ByVal ContactNo As String, ByVal EmailID As String, ByVal Logo() As Byte, ByVal TIN As String, ByVal STNo As String, ByVal CIN As String) As Integer
2991             If (CompanyName Is Nothing) Then
2992                 Throw New Global.System.ArgumentNullException(
"CompanyName")
2993             Else
2994                 Me.Adapter.InsertCommand.Parameters(
0).Value = CType(CompanyName,String)
2995             End If
2996             If (Address Is Nothing) Then
2997                 Throw New Global.System.ArgumentNullException(
"Address")
2998             Else
2999                 Me.Adapter.InsertCommand.Parameters(
1).Value = CType(Address,String)
3000             End If
3001             If (ContactNo Is Nothing) Then
3002                 Throw New Global.System.ArgumentNullException(
"ContactNo")
3003             Else
3004                 Me.Adapter.InsertCommand.Parameters(
2).Value = CType(ContactNo,String)
3005             End If
3006             If (EmailID Is Nothing) Then
3007                 Throw New Global.System.ArgumentNullException(
"EmailID")
3008             Else
3009                 Me.Adapter.InsertCommand.Parameters(
3).Value = CType(EmailID,String)
3010             End If
3011             If (Logo Is Nothing) Then
3012                 Throw New Global.System.ArgumentNullException(
"Logo")
3013             Else
3014                 Me.Adapter.InsertCommand.Parameters(
4).Value = CType(Logo,Byte())
3015             End If
3016             If (TIN Is Nothing) Then
3017                 Me.Adapter.InsertCommand.Parameters(
5).Value = Global.System.DBNull.Value
3018             Else
3019                 Me.Adapter.InsertCommand.Parameters(
5).Value = CType(TIN,String)
3020             End If
3021             If (STNo Is Nothing) Then
3022                 Me.Adapter.InsertCommand.Parameters(
6).Value = Global.System.DBNull.Value
3023             Else
3024                 Me.Adapter.InsertCommand.Parameters(
6).Value = CType(STNo,String)
3025             End If
3026             If (CIN Is Nothing) Then
3027                 Me.Adapter.InsertCommand.Parameters(
7).Value = Global.System.DBNull.Value
3028             Else
3029                 Me.Adapter.InsertCommand.Parameters(
7).Value = CType(CIN,String)
3030             End If
3031             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
3032             If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
3033                         <> Global.System.Data.ConnectionState.Open) Then
3034                 Me.Adapter.InsertCommand.Connection.Open
3035             End If
3036             Try
3037                 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
3038                 Return returnValue
3039             Finally
3040                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
3041                     Me.Adapter.InsertCommand.Connection.Close
3042                 End If
3043             End Try
3044         End Function
3045         
3046         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3047          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3048          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
3049          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update,
true)> _
3050         Public Overloads Overridable Function Update( _
3051                     ByVal CompanyName As String, _
3052                     ByVal Address As String, _
3053                     ByVal ContactNo As String, _
3054                     ByVal EmailID As String, _
3055                     ByVal Logo() As Byte, _
3056                     ByVal TIN As String, _
3057                     ByVal STNo As String, _
3058                     ByVal CIN As String, _
3059                     ByVal Original_ID As Integer, _
3060                     ByVal Original_CompanyName As String, _
3061                     ByVal Original_Address As String, _
3062                     ByVal Original_ContactNo As String, _
3063                     ByVal Original_EmailID As String, _
3064                     ByVal Original_TIN As String, _
3065                     ByVal Original_STNo As String, _
3066                     ByVal Original_CIN As String, _
3067                     ByVal ID As Integer) As Integer
3068             If (CompanyName Is Nothing) Then
3069                 Throw New Global.System.ArgumentNullException(
"CompanyName")
3070             Else
3071                 Me.Adapter.UpdateCommand.Parameters(
0).Value = CType(CompanyName,String)
3072             End If
3073             If (Address Is Nothing) Then
3074                 Throw New Global.System.ArgumentNullException(
"Address")
3075             Else
3076                 Me.Adapter.UpdateCommand.Parameters(
1).Value = CType(Address,String)
3077             End If
3078             If (ContactNo Is Nothing) Then
3079                 Throw New Global.System.ArgumentNullException(
"ContactNo")
3080             Else
3081                 Me.Adapter.UpdateCommand.Parameters(
2).Value = CType(ContactNo,String)
3082             End If
3083             If (EmailID Is Nothing) Then
3084                 Throw New Global.System.ArgumentNullException(
"EmailID")
3085             Else
3086                 Me.Adapter.UpdateCommand.Parameters(
3).Value = CType(EmailID,String)
3087             End If
3088             If (Logo Is Nothing) Then
3089                 Throw New Global.System.ArgumentNullException(
"Logo")
3090             Else
3091                 Me.Adapter.UpdateCommand.Parameters(
4).Value = CType(Logo,Byte())
3092             End If
3093             If (TIN Is Nothing) Then
3094                 Me.Adapter.UpdateCommand.Parameters(
5).Value = Global.System.DBNull.Value
3095             Else
3096                 Me.Adapter.UpdateCommand.Parameters(
5).Value = CType(TIN,String)
3097             End If
3098             If (STNo Is Nothing) Then
3099                 Me.Adapter.UpdateCommand.Parameters(
6).Value = Global.System.DBNull.Value
3100             Else
3101                 Me.Adapter.UpdateCommand.Parameters(
6).Value = CType(STNo,String)
3102             End If
3103             If (CIN Is Nothing) Then
3104                 Me.Adapter.UpdateCommand.Parameters(
7).Value = Global.System.DBNull.Value
3105             Else
3106                 Me.Adapter.UpdateCommand.Parameters(
7).Value = CType(CIN,String)
3107             End If
3108             Me.Adapter.UpdateCommand.Parameters(
8).Value = CType(Original_ID,Integer)
3109             If (Original_CompanyName Is Nothing) Then
3110                 Throw New Global.System.ArgumentNullException(
"Original_CompanyName")
3111             Else
3112                 Me.Adapter.UpdateCommand.Parameters(
9).Value = CType(Original_CompanyName,String)
3113             End If
3114             If (Original_Address Is Nothing) Then
3115                 Throw New Global.System.ArgumentNullException(
"Original_Address")
3116             Else
3117                 Me.Adapter.UpdateCommand.Parameters(
10).Value = CType(Original_Address,String)
3118             End If
3119             If (Original_ContactNo Is Nothing) Then
3120                 Throw New Global.System.ArgumentNullException(
"Original_ContactNo")
3121             Else
3122                 Me.Adapter.UpdateCommand.Parameters(
11).Value = CType(Original_ContactNo,String)
3123             End If
3124             If (Original_EmailID Is Nothing) Then
3125                 Throw New Global.System.ArgumentNullException(
"Original_EmailID")
3126             Else
3127                 Me.Adapter.UpdateCommand.Parameters(
12).Value = CType(Original_EmailID,String)
3128             End If
3129             If (Original_TIN Is Nothing) Then
3130                 Me.Adapter.UpdateCommand.Parameters(
13).Value = CType(1,Object)
3131                 Me.Adapter.UpdateCommand.Parameters(
14).Value = Global.System.DBNull.Value
3132             Else
3133                 Me.Adapter.UpdateCommand.Parameters(
13).Value = CType(0,Object)
3134                 Me.Adapter.UpdateCommand.Parameters(
14).Value = CType(Original_TIN,String)
3135             End If
3136             If (Original_STNo Is Nothing) Then
3137                 Me.Adapter.UpdateCommand.Parameters(
15).Value = CType(1,Object)
3138                 Me.Adapter.UpdateCommand.Parameters(
16).Value = Global.System.DBNull.Value
3139             Else
3140                 Me.Adapter.UpdateCommand.Parameters(
15).Value = CType(0,Object)
3141                 Me.Adapter.UpdateCommand.Parameters(
16).Value = CType(Original_STNo,String)
3142             End If
3143             If (Original_CIN Is Nothing) Then
3144                 Me.Adapter.UpdateCommand.Parameters(
17).Value = CType(1,Object)
3145                 Me.Adapter.UpdateCommand.Parameters(
18).Value = Global.System.DBNull.Value
3146             Else
3147                 Me.Adapter.UpdateCommand.Parameters(
17).Value = CType(0,Object)
3148                 Me.Adapter.UpdateCommand.Parameters(
18).Value = CType(Original_CIN,String)
3149             End If
3150             Me.Adapter.UpdateCommand.Parameters(
19).Value = CType(ID,Integer)
3151             Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
3152             If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
3153                         <> Global.System.Data.ConnectionState.Open) Then
3154                 Me.Adapter.UpdateCommand.Connection.Open
3155             End If
3156             Try
3157                 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
3158                 Return returnValue
3159             Finally
3160                 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
3161                     Me.Adapter.UpdateCommand.Connection.Close
3162                 End If
3163             End Try
3164         End Function
3165         
3166         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3167          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3168          Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapter"), _
3169          Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update,
true)> _
3170         Public Overloads Overridable Function Update( _
3171                     ByVal CompanyName As String, _
3172                     ByVal Address As String, _
3173                     ByVal ContactNo As String, _
3174                     ByVal EmailID As String, _
3175                     ByVal Logo() As Byte, _
3176                     ByVal TIN As String, _
3177                     ByVal STNo As String, _
3178                     ByVal CIN As String, _
3179                     ByVal Original_ID As Integer, _
3180                     ByVal Original_CompanyName As String, _
3181                     ByVal Original_Address As String, _
3182                     ByVal Original_ContactNo As String, _
3183                     ByVal Original_EmailID As String, _
3184                     ByVal Original_TIN As String, _
3185                     ByVal Original_STNo As String, _
3186                     ByVal Original_CIN As String) As Integer
3187             Return Me.Update(CompanyName, Address, ContactNo, EmailID, Logo, TIN, STNo, CIN, Original_ID, Original_CompanyName, Original_Address, Original_ContactNo, Original_EmailID, Original_TIN, Original_STNo, Original_CIN, Original_ID)
3188         End Function
3189     End Class
3190     
3191     
'''<summary>
3192     
'''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
3193     
'''</summary>
3194     <Global.System.ComponentModel.DesignerCategoryAttribute(
"code"), _
3195      Global.System.ComponentModel.ToolboxItem(
true), _
3196      Global.System.ComponentModel.DesignerAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _
3197         
"esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
3198      Global.System.ComponentModel.Design.HelpKeywordAttribute(
"vs.data.TableAdapterManager")> _
3199     Partial Public Class TableAdapterManager
3200         Inherits Global.System.ComponentModel.Component
3201         
3202         Private _updateOrder As UpdateOrderOption
3203         
3204         Private _voucherTableAdapter As VoucherTableAdapter
3205         
3206         Private _voucher_OtherDetailsTableAdapter As Voucher_OtherDetailsTableAdapter
3207         
3208         Private _companyTableAdapter As CompanyTableAdapter
3209         
3210         Private _backupDataSetBeforeUpdate As Boolean
3211         
3212         Private _connection As Global.System.Data.IDbConnection
3213         
3214         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3215          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3216         Public Property UpdateOrder() As UpdateOrderOption
3217             Get
3218                 Return Me._updateOrder
3219             End Get
3220             Set
3221                 Me._updateOrder =
value
3222             End Set
3223         End Property
3224         
3225         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3226          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3227          Global.System.ComponentModel.EditorAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
3228             
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
3229             
"a", "System.Drawing.Design.UITypeEditor")> _
3230         Public Property VoucherTableAdapter() As VoucherTableAdapter
3231             Get
3232                 Return Me._voucherTableAdapter
3233             End Get
3234             Set
3235                 Me._voucherTableAdapter =
value
3236             End Set
3237         End Property
3238         
3239         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3240          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3241          Global.System.ComponentModel.EditorAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
3242             
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
3243             
"a", "System.Drawing.Design.UITypeEditor")> _
3244         Public Property Voucher_OtherDetailsTableAdapter() As Voucher_OtherDetailsTableAdapter
3245             Get
3246                 Return Me._voucher_OtherDetailsTableAdapter
3247             End Get
3248             Set
3249                 Me._voucher_OtherDetailsTableAdapter =
value
3250             End Set
3251         End Property
3252         
3253         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3254          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3255          Global.System.ComponentModel.EditorAttribute(
"Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
3256             
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
3257             
"a", "System.Drawing.Design.UITypeEditor")> _
3258         Public Property CompanyTableAdapter() As CompanyTableAdapter
3259             Get
3260                 Return Me._companyTableAdapter
3261             End Get
3262             Set
3263                 Me._companyTableAdapter =
value
3264             End Set
3265         End Property
3266         
3267         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3268          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3269         Public Property BackupDataSetBeforeUpdate() As Boolean
3270             Get
3271                 Return Me._backupDataSetBeforeUpdate
3272             End Get
3273             Set
3274                 Me._backupDataSetBeforeUpdate =
value
3275             End Set
3276         End Property
3277         
3278         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3279          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3280          Global.System.ComponentModel.Browsable(
false)> _
3281         Public Property Connection() As Global.System.Data.IDbConnection
3282             Get
3283                 If (Not (Me._connection) Is Nothing) Then
3284                     Return Me._connection
3285                 End If
3286                 If ((Not (Me._voucherTableAdapter) Is Nothing) _
3287                             AndAlso (Not (Me._voucherTableAdapter.Connection) Is Nothing)) Then
3288                     Return Me._voucherTableAdapter.Connection
3289                 End If
3290                 If ((Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) _
3291                             AndAlso (Not (Me._voucher_OtherDetailsTableAdapter.Connection) Is Nothing)) Then
3292                     Return Me._voucher_OtherDetailsTableAdapter.Connection
3293                 End If
3294                 If ((Not (Me._companyTableAdapter) Is Nothing) _
3295                             AndAlso (Not (Me._companyTableAdapter.Connection) Is Nothing)) Then
3296                     Return Me._companyTableAdapter.Connection
3297                 End If
3298                 Return Nothing
3299             End Get
3300             Set
3301                 Me._connection =
value
3302             End Set
3303         End Property
3304         
3305         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3306          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
3307          Global.System.ComponentModel.Browsable(
false)> _
3308         Public ReadOnly Property TableAdapterInstanceCount() As Integer
3309             Get
3310                 Dim count As Integer =
0
3311                 If (Not (Me._voucherTableAdapter) Is Nothing) Then
3312                     count = (count +
1)
3313                 End If
3314                 If (Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) Then
3315                     count = (count +
1)
3316                 End If
3317                 If (Not (Me._companyTableAdapter) Is Nothing) Then
3318                     count = (count +
1)
3319                 End If
3320                 Return count
3321             End Get
3322         End Property
3323         
3324         
'''<summary>
3325         
'''Update rows in top-down order.
3326         
'''</summary>
3327         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3328          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3329         Private Function UpdateUpdatedRows(ByVal dataSet As Voucher_DBDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
3330             Dim result As Integer =
0
3331             If (Not (Me._voucherTableAdapter) Is Nothing) Then
3332                 Dim updatedRows() As Global.System.Data.DataRow = dataSet.Voucher.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
3333                 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
3334                 If ((Not (updatedRows) Is Nothing) _
3335                             AndAlso (
0 < updatedRows.Length)) Then
3336                     result = (result + Me._voucherTableAdapter.Update(updatedRows))
3337                     allChangedRows.AddRange(updatedRows)
3338                 End If
3339             End If
3340             If (Not (Me._companyTableAdapter) Is Nothing) Then
3341                 Dim updatedRows() As Global.System.Data.DataRow = dataSet.Company.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
3342                 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
3343                 If ((Not (updatedRows) Is Nothing) _
3344                             AndAlso (
0 < updatedRows.Length)) Then
3345                     result = (result + Me._companyTableAdapter.Update(updatedRows))
3346                     allChangedRows.AddRange(updatedRows)
3347                 End If
3348             End If
3349             If (Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) Then
3350                 Dim updatedRows() As Global.System.Data.DataRow = dataSet.Voucher_OtherDetails.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
3351                 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
3352                 If ((Not (updatedRows) Is Nothing) _
3353                             AndAlso (
0 < updatedRows.Length)) Then
3354                     result = (result + Me._voucher_OtherDetailsTableAdapter.Update(updatedRows))
3355                     allChangedRows.AddRange(updatedRows)
3356                 End If
3357             End If
3358             Return result
3359         End Function
3360         
3361         
'''<summary>
3362         
'''Insert rows in top-down order.
3363         
'''</summary>
3364         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3365          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3366         Private Function UpdateInsertedRows(ByVal dataSet As Voucher_DBDataSet, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
3367             Dim result As Integer =
0
3368             If (Not (Me._voucherTableAdapter) Is Nothing) Then
3369                 Dim addedRows() As Global.System.Data.DataRow = dataSet.Voucher.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
3370                 If ((Not (addedRows) Is Nothing) _
3371                             AndAlso (
0 < addedRows.Length)) Then
3372                     result = (result + Me._voucherTableAdapter.Update(addedRows))
3373                     allAddedRows.AddRange(addedRows)
3374                 End If
3375             End If
3376             If (Not (Me._companyTableAdapter) Is Nothing) Then
3377                 Dim addedRows() As Global.System.Data.DataRow = dataSet.Company.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
3378                 If ((Not (addedRows) Is Nothing) _
3379                             AndAlso (
0 < addedRows.Length)) Then
3380                     result = (result + Me._companyTableAdapter.Update(addedRows))
3381                     allAddedRows.AddRange(addedRows)
3382                 End If
3383             End If
3384             If (Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) Then
3385                 Dim addedRows() As Global.System.Data.DataRow = dataSet.Voucher_OtherDetails.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
3386                 If ((Not (addedRows) Is Nothing) _
3387                             AndAlso (
0 < addedRows.Length)) Then
3388                     result = (result + Me._voucher_OtherDetailsTableAdapter.Update(addedRows))
3389                     allAddedRows.AddRange(addedRows)
3390                 End If
3391             End If
3392             Return result
3393         End Function
3394         
3395         
'''<summary>
3396         
'''Delete rows in bottom-up order.
3397         
'''</summary>
3398         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3399          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3400         Private Function UpdateDeletedRows(ByVal dataSet As Voucher_DBDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
3401             Dim result As Integer =
0
3402             If (Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) Then
3403                 Dim deletedRows() As Global.System.Data.DataRow = dataSet.Voucher_OtherDetails.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
3404                 If ((Not (deletedRows) Is Nothing) _
3405                             AndAlso (
0 < deletedRows.Length)) Then
3406                     result = (result + Me._voucher_OtherDetailsTableAdapter.Update(deletedRows))
3407                     allChangedRows.AddRange(deletedRows)
3408                 End If
3409             End If
3410             If (Not (Me._companyTableAdapter) Is Nothing) Then
3411                 Dim deletedRows() As Global.System.Data.DataRow = dataSet.Company.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
3412                 If ((Not (deletedRows) Is Nothing) _
3413                             AndAlso (
0 < deletedRows.Length)) Then
3414                     result = (result + Me._companyTableAdapter.Update(deletedRows))
3415                     allChangedRows.AddRange(deletedRows)
3416                 End If
3417             End If
3418             If (Not (Me._voucherTableAdapter) Is Nothing) Then
3419                 Dim deletedRows() As Global.System.Data.DataRow = dataSet.Voucher.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
3420                 If ((Not (deletedRows) Is Nothing) _
3421                             AndAlso (
0 < deletedRows.Length)) Then
3422                     result = (result + Me._voucherTableAdapter.Update(deletedRows))
3423                     allChangedRows.AddRange(deletedRows)
3424                 End If
3425             End If
3426             Return result
3427         End Function
3428         
3429         
'''<summary>
3430         
'''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
3431         
'''</summary>
3432         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3433          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3434         Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow()
3435             If ((updatedRows Is Nothing) _
3436                         OrElse (updatedRows.Length <
1)) Then
3437                 Return updatedRows
3438             End If
3439             If ((allAddedRows Is Nothing) _
3440                         OrElse (allAddedRows.Count <
1)) Then
3441                 Return updatedRows
3442             End If
3443             Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
3444             Dim i As Integer =
0
3445             Do While (i < updatedRows.Length)
3446                 Dim row As Global.System.Data.DataRow = updatedRows(i)
3447                 If (allAddedRows.Contains(row) =
false) Then
3448                     realUpdatedRows.Add(row)
3449                 End If
3450                 i = (i +
1)
3451             Loop
3452             Return realUpdatedRows.ToArray
3453         End Function
3454         
3455         
'''<summary>
3456         
'''Update all changes to the dataset.
3457         
'''</summary>
3458         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3459          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3460         Public Overridable Function UpdateAll(ByVal dataSet As Voucher_DBDataSet) As Integer
3461             If (dataSet Is Nothing) Then
3462                 Throw New Global.System.ArgumentNullException(
"dataSet")
3463             End If
3464             If (dataSet.HasChanges =
false) Then
3465                 Return
0
3466             End If
3467             If ((Not (Me._voucherTableAdapter) Is Nothing) _
3468                         AndAlso (Me.MatchTableAdapterConnection(Me._voucherTableAdapter.Connection) =
false)) Then
3469                 Throw New Global.System.ArgumentException(
"All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
3470                         
"tring.")
3471             End If
3472             If ((Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) _
3473                         AndAlso (Me.MatchTableAdapterConnection(Me._voucher_OtherDetailsTableAdapter.Connection) =
false)) Then
3474                 Throw New Global.System.ArgumentException(
"All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
3475                         
"tring.")
3476             End If
3477             If ((Not (Me._companyTableAdapter) Is Nothing) _
3478                         AndAlso (Me.MatchTableAdapterConnection(Me._companyTableAdapter.Connection) =
false)) Then
3479                 Throw New Global.System.ArgumentException(
"All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
3480                         
"tring.")
3481             End If
3482             Dim workConnection As Global.System.Data.IDbConnection = Me.Connection
3483             If (workConnection Is Nothing) Then
3484                 Throw New Global.System.ApplicationException(
"TableAdapterManager contains no connection information. Set each TableAdapterMana"& _
3485                         
"ger TableAdapter property to a valid TableAdapter instance.")
3486             End If
3487             Dim workConnOpened As Boolean =
false
3488             If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _
3489                         = Global.System.Data.ConnectionState.Broken) Then
3490                 workConnection.Close
3491             End If
3492             If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then
3493                 workConnection.Open
3494                 workConnOpened =
true
3495             End If
3496             Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction
3497             If (workTransaction Is Nothing) Then
3498                 Throw New Global.System.ApplicationException(
"The transaction cannot begin. The current data connection does not support transa"& _
3499                         
"ctions or the current state is not allowing the transaction to begin.")
3500             End If
3501             Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
3502             Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
3503             Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)()
3504             Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)()
3505             Dim result As Integer =
0
3506             Dim backupDataSet As Global.System.Data.DataSet = Nothing
3507             If Me.BackupDataSetBeforeUpdate Then
3508                 backupDataSet = New Global.System.Data.DataSet()
3509                 backupDataSet.Merge(dataSet)
3510             End If
3511             Try
3512                 
'---- Prepare for update -----------
3513                 
'
3514                 If (Not (Me._voucherTableAdapter) Is Nothing) Then
3515                     revertConnections.Add(Me._voucherTableAdapter, Me._voucherTableAdapter.Connection)
3516                     Me._voucherTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
3517                     Me._voucherTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
3518                     If Me._voucherTableAdapter.Adapter.AcceptChangesDuringUpdate Then
3519                         Me._voucherTableAdapter.Adapter.AcceptChangesDuringUpdate =
false
3520                         adaptersWithAcceptChangesDuringUpdate.Add(Me._voucherTableAdapter.Adapter)
3521                     End If
3522                 End If
3523                 If (Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) Then
3524                     revertConnections.Add(Me._voucher_OtherDetailsTableAdapter, Me._voucher_OtherDetailsTableAdapter.Connection)
3525                     Me._voucher_OtherDetailsTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
3526                     Me._voucher_OtherDetailsTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
3527                     If Me._voucher_OtherDetailsTableAdapter.Adapter.AcceptChangesDuringUpdate Then
3528                         Me._voucher_OtherDetailsTableAdapter.Adapter.AcceptChangesDuringUpdate =
false
3529                         adaptersWithAcceptChangesDuringUpdate.Add(Me._voucher_OtherDetailsTableAdapter.Adapter)
3530                     End If
3531                 End If
3532                 If (Not (Me._companyTableAdapter) Is Nothing) Then
3533                     revertConnections.Add(Me._companyTableAdapter, Me._companyTableAdapter.Connection)
3534                     Me._companyTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
3535                     Me._companyTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
3536                     If Me._companyTableAdapter.Adapter.AcceptChangesDuringUpdate Then
3537                         Me._companyTableAdapter.Adapter.AcceptChangesDuringUpdate =
false
3538                         adaptersWithAcceptChangesDuringUpdate.Add(Me._companyTableAdapter.Adapter)
3539                     End If
3540                 End If
3541                 
'
3542                 
'---- Perform updates -----------
3543                 
'
3544                 If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then
3545                     result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
3546                     result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
3547                 Else
3548                     result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
3549                     result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
3550                 End If
3551                 result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows))
3552                 
'
3553                 
'---- Commit updates -----------
3554                 
'
3555                 workTransaction.Commit
3556                 If (
0 < allAddedRows.Count) Then
3557                     Dim rows((allAddedRows.Count) -
1) As Global.System.Data.DataRow
3558                     allAddedRows.CopyTo(rows)
3559                     Dim i As Integer =
0
3560                     Do While (i < rows.Length)
3561                         Dim row As Global.System.Data.DataRow = rows(i)
3562                         row.AcceptChanges
3563                         i = (i +
1)
3564                     Loop
3565                 End If
3566                 If (
0 < allChangedRows.Count) Then
3567                     Dim rows((allChangedRows.Count) -
1) As Global.System.Data.DataRow
3568                     allChangedRows.CopyTo(rows)
3569                     Dim i As Integer =
0
3570                     Do While (i < rows.Length)
3571                         Dim row As Global.System.Data.DataRow = rows(i)
3572                         row.AcceptChanges
3573                         i = (i +
1)
3574                     Loop
3575                 End If
3576             Catch ex As Global.System.Exception
3577                 workTransaction.Rollback
3578                 
'---- Restore the dataset -----------
3579                 If Me.BackupDataSetBeforeUpdate Then
3580                     Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing))
3581                     dataSet.Clear
3582                     dataSet.Merge(backupDataSet)
3583                 Else
3584                     If (
0 < allAddedRows.Count) Then
3585                         Dim rows((allAddedRows.Count) -
1) As Global.System.Data.DataRow
3586                         allAddedRows.CopyTo(rows)
3587                         Dim i As Integer =
0
3588                         Do While (i < rows.Length)
3589                             Dim row As Global.System.Data.DataRow = rows(i)
3590                             row.AcceptChanges
3591                             row.SetAdded
3592                             i = (i +
1)
3593                         Loop
3594                     End If
3595                 End If
3596                 Throw ex
3597             Finally
3598                 If workConnOpened Then
3599                     workConnection.Close
3600                 End If
3601                 If (Not (Me._voucherTableAdapter) Is Nothing) Then
3602                     Me._voucherTableAdapter.Connection = CType(revertConnections(Me._voucherTableAdapter),Global.System.Data.SqlClient.SqlConnection)
3603                     Me._voucherTableAdapter.Transaction = Nothing
3604                 End If
3605                 If (Not (Me._voucher_OtherDetailsTableAdapter) Is Nothing) Then
3606                     Me._voucher_OtherDetailsTableAdapter.Connection = CType(revertConnections(Me._voucher_OtherDetailsTableAdapter),Global.System.Data.SqlClient.SqlConnection)
3607                     Me._voucher_OtherDetailsTableAdapter.Transaction = Nothing
3608                 End If
3609                 If (Not (Me._companyTableAdapter) Is Nothing) Then
3610                     Me._companyTableAdapter.Connection = CType(revertConnections(Me._companyTableAdapter),Global.System.Data.SqlClient.SqlConnection)
3611                     Me._companyTableAdapter.Transaction = Nothing
3612                 End If
3613                 If (
0 < adaptersWithAcceptChangesDuringUpdate.Count) Then
3614                     Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) -
1) As Global.System.Data.Common.DataAdapter
3615                     adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters)
3616                     Dim i As Integer =
0
3617                     Do While (i < adapters.Length)
3618                         Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i)
3619                         adapter.AcceptChangesDuringUpdate =
true
3620                         i = (i +
1)
3621                     Loop
3622                 End If
3623             End Try
3624             Return result
3625         End Function
3626         
3627         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3628          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3629         Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
3630             Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst))
3631         End Sub
3632         
3633         <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3634          Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3635         Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean
3636             If (Not (Me._connection) Is Nothing) Then
3637                 Return
true
3638             End If
3639             If ((Me.Connection Is Nothing) _
3640                         OrElse (inputConnection Is Nothing)) Then
3641                 Return
true
3642             End If
3643             If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then
3644                 Return
true
3645             End If
3646             Return
false
3647         End Function
3648         
3649         
'''<summary>
3650         
'''Update Order Option
3651         
'''</summary>
3652         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3653         Public Enum UpdateOrderOption
3654             
3655             InsertUpdateDelete =
0
3656             
3657             UpdateInsertDelete =
1
3658         End Enum
3659         
3660         
'''<summary>
3661         
'''Used to sort self-referenced table's rows
3662         
'''</summary>
3663         <Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3664         Private Class SelfReferenceComparer
3665             Inherits Object
3666             Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow)
3667             
3668             Private _relation As Global.System.Data.DataRelation
3669             
3670             Private _childFirst As Integer
3671             
3672             <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3673              Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3674             Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
3675                 MyBase.New
3676                 Me._relation = relation
3677                 If childFirst Then
3678                     Me._childFirst = -
1
3679                 Else
3680                     Me._childFirst =
1
3681                 End If
3682             End Sub
3683             
3684             <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3685              Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3686             Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow
3687                 Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing))
3688                 Dim root As Global.System.Data.DataRow = row
3689                 distance =
0
3690
3691                 Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)()
3692                 traversedRows(row) = row
3693
3694                 Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
3695
3696                 Do While ((Not (parent) Is Nothing) _
3697                             AndAlso (traversedRows.ContainsKey(parent) =
false))
3698                     distance = (distance +
1)
3699                     root = parent
3700                     traversedRows(parent) = parent
3701                     parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
3702
3703                 Loop
3704
3705                 If (distance =
0) Then
3706                     traversedRows.Clear
3707                     traversedRows(row) = row
3708                     parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
3709
3710                     Do While ((Not (parent) Is Nothing) _
3711                                 AndAlso (traversedRows.ContainsKey(parent) =
false))
3712                         distance = (distance +
1)
3713                         root = parent
3714                         traversedRows(parent) = parent
3715                         parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
3716
3717                     Loop
3718                 End If
3719
3720                 Return root
3721             End Function
3722             
3723             <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3724              Global.System.CodeDom.Compiler.GeneratedCodeAttribute(
"System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
3725             Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare
3726                 If Object.ReferenceEquals(row1, row2) Then
3727                     Return
0
3728                 End If
3729                 If (row1 Is Nothing) Then
3730                     Return -
1
3731                 End If
3732                 If (row2 Is Nothing) Then
3733                     Return
1
3734                 End If
3735
3736                 Dim distance1 As Integer =
0
3737                 Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1)
3738
3739                 Dim distance2 As Integer =
0
3740                 Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2)
3741
3742                 If Object.ReferenceEquals(root1, root2) Then
3743                     Return (Me._childFirst * distance1.CompareTo(distance2))
3744                 Else
3745                     Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _
3746                                     AndAlso (Not (root2.Table) Is Nothing)))
3747                     If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then
3748                         Return -
1
3749                     Else
3750                         Return
1
3751                     End If
3752                 End If
3753             End Function
3754         End Class
3755     End Class
3756 End Namespace


Gõ tìm kiếm nhanh...